From f614d1fc1480724b2d5f2cb409ad8a1962173b74 Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 14 Jun 2019 12:09:42 +0100 Subject: add `self` check.command, change !config to use new yields --- modules/commands/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/commands') diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 3b4dc74e..69b7201c 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -604,3 +604,11 @@ class Module(ModuleManager.BaseModule): del aliases[alias] self._set_aliases(event["server"], aliases) event["stdout"].write("Removed '%s' alias" % alias) + + @utils.hook("check.command.self") + def check_command_self(self, event): + if event["server"].irc_lower(event["request_args"][0] + ) == event["user"].name: + return utils.consts.PERMISSION_FORCE_SUCCESS + else: + return "You do not have permission to do this" -- cgit v1.3.1-10-gc9f91