mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
plugins/Channel: Make disable/enable work again.
This commit is contained in:
parent
d26f9b1405
commit
106fbc6eea
@ -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 '
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user