# HG changeset patch # User Kim Alvefur # Date 1680465533 -7200 # Node ID 3174308d127e3e23121679c1cf734d23a866ce59 # Parent 8a2f75e38eb28f8f8e932b4d9e0c2fc8f8972d17 mod_adhoc: Remove "mod_" prefix from permission action name Other places doesn't have "mod_" there, why should it here? diff -r 8a2f75e38eb2 -r 3174308d127e plugins/adhoc/adhoc.lib.lua --- a/plugins/adhoc/adhoc.lib.lua Thu Mar 17 17:45:27 2022 +0000 +++ b/plugins/adhoc/adhoc.lib.lua Sun Apr 02 21:58:53 2023 +0200 @@ -27,10 +27,10 @@ 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 -r 8a2f75e38eb2 -r 3174308d127e plugins/adhoc/mod_adhoc.lua --- a/plugins/adhoc/mod_adhoc.lua Thu Mar 17 17:45:27 2022 +0000 +++ b/plugins/adhoc/mod_adhoc.lua Sun Apr 02 21:58:53 2023 +0200 @@ -15,7 +15,7 @@ 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