diff options
| author | 2019-05-23 11:44:52 +0100 | |
|---|---|---|
| committer | 2019-05-23 11:44:52 +0100 | |
| commit | 9df7b80d007bcae8309dd6bec2af848f9ea12644 (patch) | |
| tree | a3daa5c297237fbce738908048965c8f4639ba44 /modules/commands | |
| parent | Only show register/identify advice when we're using `internal` auth (diff) | |
| signature | ||
pass the `command_prefix` that triggered an event through event kwargs
Diffstat (limited to 'modules/commands')
| -rw-r--r-- | modules/commands/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index b3227001..140ebc35 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -160,7 +160,7 @@ class Module(ModuleManager.BaseModule): returns = self.events.on("preprocess.command").call_unsafe( hook=hook, user=user, server=server, target=target, is_channel=is_channel, tags=tags, args_split=args_split, - command=command) + command=command, **kwargs) hard_fail = False force_success = False @@ -235,7 +235,8 @@ class Module(ModuleManager.BaseModule): if hook: self.command(event["server"], event["channel"], event["target_str"], True, event["user"], command, - args_split, event["tags"], hook) + args_split, event["tags"], hook, + command_prefix=command_prefix) event["channel"].buffer.skip_next() else: regex_hook = self.events.on("command.regex").get_hooks() @@ -251,7 +252,7 @@ class Module(ModuleManager.BaseModule): res = self.command(event["server"], event["channel"], event["target_str"], True, event["user"], command, "", event["tags"], hook, match=match, - message=event["message"]) + message=event["message"], command_prefix="") if res: break @@ -268,7 +269,7 @@ class Module(ModuleManager.BaseModule): if hook: self.command(event["server"], event["user"], event["user"].nickname, False, event["user"], command, - args_split, event["tags"], hook) + args_split, event["tags"], hook, command_prefix="") event["user"].buffer.skip_next() def _get_help(self, hook): |
