aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/adhoc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-04-02 21:58:53 +0200
committerKim Alvefur <zash@zash.se>2023-04-02 21:58:53 +0200
commitade5f403711f58aa07828b8cacfb2c8943f58163 (patch)
treec0bcd3b9b4c79dada32e14cc46a2860e304e3fce /plugins/adhoc
parentb06dd038cd796b93f9fa7a578ba0f279feb2f2b0 (diff)
downloadprosody-ade5f403711f58aa07828b8cacfb2c8943f58163.tar.gz
prosody-ade5f403711f58aa07828b8cacfb2c8943f58163.zip
mod_adhoc: Remove "mod_" prefix from permission action name
Other places doesn't have "mod_" there, why should it here?
Diffstat (limited to 'plugins/adhoc')
-rw-r--r--plugins/adhoc/adhoc.lib.lua4
-rw-r--r--plugins/adhoc/mod_adhoc.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/plugins/adhoc/adhoc.lib.lua b/plugins/adhoc/adhoc.lib.lua
index 2d00b778..0ce45e19 100644
--- a/plugins/adhoc/adhoc.lib.lua
+++ b/plugins/adhoc/adhoc.lib.lua
@@ -27,10 +27,10 @@ function _M.new(name, node, handler, permission)
error "the permission mode 'user' has been renamed 'any', please update your code"
end
if permission == "admin" then
- module:default_permission("prosody:admin", "mod_adhoc:"..node);
+ module:default_permission("prosody:admin", "adhoc:"..node);
permission = "check";
elseif permission == "global_admin" then
- module:default_permission("prosody:operator", "mod_adhoc:"..node);
+ module:default_permission("prosody:operator", "adhoc:"..node);
permission = "check";
end
return { name = name, node = node, handler = handler, cmdtag = _cmdtag, permission = permission };
diff --git a/plugins/adhoc/mod_adhoc.lua b/plugins/adhoc/mod_adhoc.lua
index 505579bf..4482682d 100644
--- a/plugins/adhoc/mod_adhoc.lua
+++ b/plugins/adhoc/mod_adhoc.lua
@@ -15,7 +15,7 @@ local commands = {};
module:add_feature(xmlns_cmd);
local function check_permissions(event, node, command)
- return (command.permission == "check" and module:may("mod_adhoc:"..node, event))
+ return (command.permission == "check" and module:may("adhoc:"..node, event))
or (command.permission == "local_user" and jid_host(event.stanza.attr.from) == module.host)
or (command.permission == "any");
end