From d2ec31c45bd05e405e6308c52c2bc573ec10ae16 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 13 Sep 2003 14:46:03 +0000 Subject: [PATCH] Fixed bug in removeAlias that it wouldn't clear the frozen set. --- plugins/Alias.py | 1 + test/test_Alias.py | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/Alias.py b/plugins/Alias.py index 7f4d936fd..31c773009 100644 --- a/plugins/Alias.py +++ b/plugins/Alias.py @@ -206,6 +206,7 @@ class Alias(callbacks.Privmsg): if hasattr(self, name) and self.isCommand(name): if evenIfFrozen or name not in self.frozen: delattr(self.__class__, name) + self.frozen.discard(name) else: raise AliasError, 'That alias is frozen.' else: diff --git a/test/test_Alias.py b/test/test_Alias.py index c934e82e1..978bae6ff 100644 --- a/test/test_Alias.py +++ b/test/test_Alias.py @@ -108,6 +108,7 @@ class AliasTestCase(PluginTestCase, PluginDocumentation): self.assertResponse('foobar', 'sbbone') self.assertRaises(Alias.AliasError, cb.removeAlias, 'foobar') cb.removeAlias('foobar', evenIfFrozen=True) + self.failIf('foobar' in cb.frozen) self.assertNoResponse('foobar', 2) def testOptionalArgs(self):