mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +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)
|
'called %s.', plugin.name(), command)
|
||||||
elif command:
|
elif command:
|
||||||
# findCallbackForCommand
|
# findCallbackForCommand
|
||||||
if irc.findCallbackForCommand(command):
|
if filter(None, irc.findCallbacksForArgs([command])):
|
||||||
s = '-%s' % command
|
s = '-%s' % command
|
||||||
else:
|
else:
|
||||||
failMsg = format('No plugin or command named %s could be '
|
failMsg = format('No plugin or command named %s could be '
|
||||||
@ -743,7 +743,7 @@ class Channel(callbacks.Plugin):
|
|||||||
'called %s.', plugin.name(), command)
|
'called %s.', plugin.name(), command)
|
||||||
elif command:
|
elif command:
|
||||||
# findCallbackForCommand
|
# findCallbackForCommand
|
||||||
if irc.findCallbackForCommand(command):
|
if filter(None, irc.findCallbacksForArgs([command])):
|
||||||
s = '-%s' % command
|
s = '-%s' % command
|
||||||
else:
|
else:
|
||||||
failMsg = format('No plugin or command named %s could be '
|
failMsg = format('No plugin or command named %s could be '
|
||||||
|
@ -67,7 +67,7 @@ class ChannelTestCase(ChannelPluginTestCase):
|
|||||||
self.assertRegexp('channel capability list', 'baz')
|
self.assertRegexp('channel capability list', 'baz')
|
||||||
self.assertNotError('channel capability unset -foo baz')
|
self.assertNotError('channel capability unset -foo baz')
|
||||||
self.assertError('channel capability unset baz')
|
self.assertError('channel capability unset baz')
|
||||||
|
|
||||||
def testEnableDisable(self):
|
def testEnableDisable(self):
|
||||||
self.assertNotRegexp('channel capability list', '-Channel')
|
self.assertNotRegexp('channel capability list', '-Channel')
|
||||||
self.assertError('channel enable channel')
|
self.assertError('channel enable channel')
|
||||||
@ -159,7 +159,8 @@ class ChannelTestCase(ChannelPluginTestCase):
|
|||||||
## self.assertBan('kban --user foobar', '*!user@*')
|
## self.assertBan('kban --user foobar', '*!user@*')
|
||||||
## self.assertBan('kban --nick foobar', 'foobar!*@*')
|
## self.assertBan('kban --nick foobar', 'foobar!*@*')
|
||||||
## self.assertBan('kban --nick --user foobar', 'foobar!user@*')
|
## 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 --user --host foobar', '*!user@host.domain.tld')
|
||||||
## self.assertBan('kban --nick --user --host foobar',
|
## self.assertBan('kban --nick --user --host foobar',
|
||||||
## 'foobar!user@host.domain.tld')
|
## 'foobar!user@host.domain.tld')
|
||||||
|
Loading…
Reference in New Issue
Block a user