From a64d6b38812f72e42f098a3d4a9e8c5a65fbdeab Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 5 Aug 2004 03:57:48 +0000 Subject: [PATCH] Handle the no plugins case. --- src/Misc.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Misc.py b/src/Misc.py index 81bbfeef9..dbfc66346 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -91,7 +91,13 @@ class Misc(callbacks.Privmsg): if (private and not isPublic(cb)) or (not private and isPublic(cb))] names.sort() - irc.reply(utils.commaAndify(names)) + if names: + irc.reply(utils.commaAndify(names)) + else: + if private: + irc.reply('There are no private plugins.') + else: + irc.reply('There are no public plugins.') else: cb = irc.getCallback(name) if cb is None: @@ -116,7 +122,7 @@ class Misc(callbacks.Privmsg): irc.reply(utils.commaAndify(commands)) else: irc.error('That plugin exists, but it has no ' - 'commands with help.') + 'commands with help.') def apropos(self, irc, msg, args): """