diff options
| author | 2020-04-07 19:30:32 +0100 | |
|---|---|---|
| committer | 2020-04-07 19:30:32 +0100 | |
| commit | 2b0dfcc1556741dab5452a8e1ece5f439023728c (patch) | |
| tree | b0caecc13a9f2e7082f45e89dfd0b431db65402a /src | |
| parent | handle http redirects ourselves, to prevent redirect to localhost (diff) | |
| signature | ||
add ${BNICK} (bot's own nick) and ${CTRIGGER} (command trigger) to aliases
Diffstat (limited to 'src')
| -rw-r--r-- | src/core_modules/commands/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core_modules/commands/__init__.py b/src/core_modules/commands/__init__.py index 777cb692..3a0e74cd 100644 --- a/src/core_modules/commands/__init__.py +++ b/src/core_modules/commands/__init__.py @@ -73,12 +73,12 @@ class Module(ModuleManager.BaseModule): self.bot.get_setting(COMMAND_METHOD, default))).upper() def _find_command_hook(self, server, target, is_channel, command, user, - args): + command_prefix, args): if not self.has_command(command): command_event = CommandEvent(command, args) self.events.on("get.command").call(command=command_event, server=server, target=target, is_channel=is_channel, user=user, - kwargs={}) + command_prefix=command_prefix, kwargs={}) command = command_event.command args = command_event.args @@ -305,7 +305,7 @@ class Module(ModuleManager.BaseModule): try: hook, command, args_split = self._find_command_hook( event["server"], event["channel"], True, command, - event["user"], args) + event["user"], command_prefix, args) except BadContextException: event["channel"].send_message( "%s: That command is not valid in a channel" % @@ -367,7 +367,7 @@ class Module(ModuleManager.BaseModule): try: hook, command, args_split = self._find_command_hook( event["server"], event["user"], False, command, - event["user"], args) + event["user"], "", args) except BadContextException: event["user"].send_message( "That command is not valid in a PM") |
