aboutsummaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-24 22:54:34 +0100
committerGravatar jesopo2019-06-24 22:54:34 +0100
commit7f0af15e2d19475567f87491d4243f1b417d3fb6 (patch)
tree47671f9bdd19ce20e38b0f29c74d6f66d4cfcd7b /modules/commands
parentFire an event when a user tries an unknown command (diff)
signature
send is_channel kwarg on unknown.command event
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py
index 673e62ab..54bb6db3 100644
--- a/modules/commands/__init__.py
+++ b/modules/commands/__init__.py
@@ -281,7 +281,8 @@ class Module(ModuleManager.BaseModule):
else:
self.events.on("unknown.command").call(server=event["server"],
target=event["channel"], user=event["user"],
- command=command, command_prefix=command_prefix)
+ command=command, command_prefix=command_prefix,
+ is_channel=True)
else:
regex_hooks = self.events.on("command.regex").get_hooks()
for hook in regex_hooks:
@@ -325,7 +326,7 @@ class Module(ModuleManager.BaseModule):
else:
self.events.on("unknown.command").call(server=event["server"],
target=event["user"], user=event["user"], command=command,
- command_prefix="")
+ command_prefix="", is_channel=False)
def _get_usage(self, hook, command, command_prefix=""):
command = "%s%s" % (command_prefix, command)