From 1c10d4cd2070ac69a6d3c7104092c7809a7d435c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 19 Feb 2005 19:44:49 +0000 Subject: [PATCH] Fixed help. --- plugins/Misc/plugin.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 32bbf4541..72dd037e2 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -170,18 +170,17 @@ class Misc(callbacks.Plugin): """ (maxL, cbs) = irc.findCallbacksForArgs(command) if maxL == command: - if not cbs: - irc.error(format('There is no command %q.', - callbacks.formatCommand(command))) - elif len(cbs) > 1: + if len(cbs) > 1: names = sorted([cb.name() for cb in cbs]) irc.error(format('That command exists in the %L plugins. ' 'Please specify exactly which plugin command ' 'you want help with.', names)) else: + assert cbs, 'Odd, maxL == command, but no cbs.' irc.reply(cbs[0].getCommandHelp(command)) else: - irc.reply(cbs[0].getCommandHelp(command)) + irc.reply('There is no command %q.', + callbacks.formatCommand(command)) help = wrap(help, [many('something')]) def hostmask(self, irc, msg, args, nick):