Fixed bug in removeAlias that it wouldn't clear the frozen set.

This commit is contained in:
Jeremy Fincher 2003-09-13 14:46:03 +00:00
parent c232a31f8f
commit d2ec31c45b
2 changed files with 2 additions and 0 deletions

View File

@ -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:

View File

@ -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):