aboutsummaryrefslogtreecommitdiff
path: root/modules/commands.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-01-30 11:26:54 +0000
committerGravatar jesopo2019-01-30 11:26:54 +0000
commitfc4a8d8e34bba34b98d44195cb7c38b31a910b95 (patch)
treeff642b466f50fcfc3860bb035f3c7125bc734f57 /modules/commands.py
parentGet all hooks when checking command hooks, not just the first (commands.py) (diff)
signature
We should be using `potential_hook` until we've decided on a valid hook
(commands.py)
Diffstat (limited to 'modules/commands.py')
-rw-r--r--modules/commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands.py b/modules/commands.py
index f98f4a52..70d92c1a 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -143,19 +143,19 @@ class Module(ModuleManager.BaseModule):
hook = None
target = None
for potential_hook in self.get_hooks(command):
- alias_of = self._get_alias_of(hook)
+ alias_of = self._get_alias_of(potential_hook)
if alias_of:
if self.has_command(alias_of):
- hook = self.get_hooks(alias_of)[0]
+ potential_hook = self.get_hooks(alias_of)[0]
else:
raise ValueError(
"'%s' is an alias of unknown command '%s'"
% (command.lower(), alias_of.lower()))
is_channel = False
- if not is_channel and hook.kwargs.get("channel_only"):
+ if not is_channel and potential_hook.kwargs.get("channel_only"):
continue
- if is_channel and hook.kwargs.get("private_only"):
+ if is_channel and potential_hook.kwargs.get("private_only"):
continue
hook = potential_hook