diff --git a/src/Misc.py b/src/Misc.py index 6d22433a2..936c191e8 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -403,7 +403,12 @@ class Misc(callbacks.Privmsg): if cbs: names = [cb.name() for cb in cbs] names.sort() - irc.reply(utils.commaAndify(names)) + plugin = utils.commaAndify(names) + if irc.nested: + irc.reply(utils.commaAndify(names)) + else: + irc.reply('The %s command is available in %s.' % + (command, plugin)) else: irc.error('There is no such command %s.' % command) diff --git a/test/test_Misc.py b/test/test_Misc.py index 589c1af07..7e997d162 100644 --- a/test/test_Misc.py +++ b/test/test_Misc.py @@ -152,7 +152,8 @@ class MiscTestCase(ChannelPluginTestCase): self.assertNotError('source') def testPlugin(self): - self.assertResponse('plugin plugin', 'Misc') + self.assertRegexp('plugin plugin', 'available.*Misc') + self.assertResponse('echo [plugin plugin]', 'Misc') def testTell(self): m = self.getMsg('tell foo [plugin tell]')