From fc4a8d8e34bba34b98d44195cb7c38b31a910b95 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 30 Jan 2019 11:26:54 +0000 Subject: [PATCH] We should be using `potential_hook` until we've decided on a valid hook (commands.py) --- modules/commands.py | 8 ++++---- 1 file 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