From afc78317c7b900e40c4a5f1fe6c13acf7c93d659 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 27 Apr 2006 22:11:30 +0000 Subject: [PATCH] plugins/Alias: Update Alias.lock and Alias.unlock to work now that aliases are no longer attributes of the plugin. --- plugins/Alias/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Alias/plugin.py b/plugins/Alias/plugin.py index 5791be38b..409e9cf46 100644 --- a/plugins/Alias/plugin.py +++ b/plugins/Alias/plugin.py @@ -219,7 +219,7 @@ class Alias(callbacks.Plugin): Locks an alias so that no one else can change it. """ - if hasattr(self, name) and self.isCommandMethod(name): + if name in self.aliases and self.isCommandMethod(name): self.aliases[name][1] = True conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(True) irc.replySuccess() @@ -232,7 +232,7 @@ class Alias(callbacks.Plugin): Unlocks an alias so that people can define new aliases over it. """ - if hasattr(self, name) and self.isCommandMethod(name): + if name in self.aliases and self.isCommandMethod(name): self.aliases[name][1] = False conf.supybot.plugins.Alias.aliases.get(name).locked.setValue(False) irc.replySuccess()