mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Handle properly the case where no matching commands were found.
This commit is contained in:
parent
a1c911e954
commit
fc11ff4f24
@ -180,8 +180,11 @@ class Misc(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
for name in names:
|
for name in names:
|
||||||
L.append('%s %s' % (name, key))
|
L.append('%s %s' % (name, key))
|
||||||
|
if L:
|
||||||
L.sort()
|
L.sort()
|
||||||
irc.reply(msg, utils.commaAndify(L))
|
irc.reply(msg, utils.commaAndify(L))
|
||||||
|
else:
|
||||||
|
irc.error(msg, 'No appropriate commands were found.')
|
||||||
|
|
||||||
def help(self, irc, msg, args):
|
def help(self, irc, msg, args):
|
||||||
"""[<plugin>] <command>
|
"""[<plugin>] <command>
|
||||||
|
@ -142,6 +142,7 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
|
|
||||||
def testApropos(self):
|
def testApropos(self):
|
||||||
self.assertNotError('apropos f')
|
self.assertNotError('apropos f')
|
||||||
|
self.assertError('apropos asldkfjasdlkfja')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user