plugins/Channel: Make disable/enable work again.

This commit is contained in:
James Vega 2005-05-11 00:58:58 +00:00
parent d26f9b1405
commit 106fbc6eea
2 changed files with 5 additions and 4 deletions

View File

@ -705,7 +705,7 @@ class Channel(callbacks.Plugin):
'called %s.', plugin.name(), command)
elif command:
# findCallbackForCommand
if irc.findCallbackForCommand(command):
if filter(None, irc.findCallbacksForArgs([command])):
s = '-%s' % command
else:
failMsg = format('No plugin or command named %s could be '
@ -743,7 +743,7 @@ class Channel(callbacks.Plugin):
'called %s.', plugin.name(), command)
elif command:
# findCallbackForCommand
if irc.findCallbackForCommand(command):
if filter(None, irc.findCallbacksForArgs([command])):
s = '-%s' % command
else:
failMsg = format('No plugin or command named %s could be '

View File

@ -67,7 +67,7 @@ class ChannelTestCase(ChannelPluginTestCase):
self.assertRegexp('channel capability list', 'baz')
self.assertNotError('channel capability unset -foo baz')
self.assertError('channel capability unset baz')
def testEnableDisable(self):
self.assertNotRegexp('channel capability list', '-Channel')
self.assertError('channel enable channel')
@ -159,7 +159,8 @@ class ChannelTestCase(ChannelPluginTestCase):
## self.assertBan('kban --user foobar', '*!user@*')
## self.assertBan('kban --nick foobar', 'foobar!*@*')
## self.assertBan('kban --nick --user foobar', 'foobar!user@*')
## self.assertBan('kban --nick --host foobar', 'foobar!*@host.domain.tld')
## self.assertBan('kban --nick --host foobar',
## 'foobar!*@host.domain.tld')
## self.assertBan('kban --user --host foobar', '*!user@host.domain.tld')
## self.assertBan('kban --nick --user --host foobar',
## 'foobar!user@host.domain.tld')