comparison plugins/adhoc/mod_adhoc.lua @ 13020:3174308d127e

mod_adhoc: Remove "mod_" prefix from permission action name Other places doesn't have "mod_" there, why should it here?
author Kim Alvefur <zash@zash.se>
date Sun, 02 Apr 2023 21:58:53 +0200
parents 74b9e05af71e
children 6771acb8e857
comparison
equal deleted inserted replaced
13019:8a2f75e38eb2 13020:3174308d127e
13 local commands = {}; 13 local commands = {};
14 14
15 module:add_feature(xmlns_cmd); 15 module:add_feature(xmlns_cmd);
16 16
17 local function check_permissions(event, node, command) 17 local function check_permissions(event, node, command)
18 return (command.permission == "check" and module:may("mod_adhoc:"..node, event)) 18 return (command.permission == "check" and module:may("adhoc:"..node, event))
19 or (command.permission == "local_user" and jid_host(event.stanza.attr.from) == module.host) 19 or (command.permission == "local_user" and jid_host(event.stanza.attr.from) == module.host)
20 or (command.permission == "any"); 20 or (command.permission == "any");
21 end 21 end
22 22
23 module:hook("host-disco-info-node", function (event) 23 module:hook("host-disco-info-node", function (event)