mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 02:24:12 +01:00
Fixed bug in removeAlias that it wouldn't clear the frozen set.
This commit is contained in:
parent
c232a31f8f
commit
d2ec31c45b
@ -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:
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user