From 8fb97c56bc4017c16689d74c113a6bac843fc590 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 29 Jun 2011 13:56:22 +0200 Subject: [PATCH] Owner: Fix bug with @enable and @disable if a plugin is given. Closes GH-43. Closes GH-44. Signed-off-by: James McCoy --- plugins/Owner/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index e0d6f5332..90dacad8b 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -537,11 +537,11 @@ class Owner(callbacks.Plugin): if plugin.isCommand(command): pluginCommand = '%s.%s' % (plugin.name(), command) conf.supybot.commands.disabled().add(pluginCommand) + plugin._disabled.add(command) else: irc.error('%s is not a command in the %s plugin.' % (command, plugin.name())) return - self._disabled.add(pluginCommand, plugin.name()) else: conf.supybot.commands.disabled().add(command) self._disabled.add(command) @@ -557,8 +557,8 @@ class Owner(callbacks.Plugin): """ try: if plugin: + plugin._disabled.remove(command, plugin.name()) command = '%s.%s' % (plugin.name(), command) - self._disabled.remove(command, plugin.name()) else: self._disabled.remove(command) conf.supybot.commands.disabled().remove(command)