Made error message better for dispatcher commands.

This commit is contained in:
Jeremy Fincher 2003-10-22 17:19:08 +00:00
parent 6cf0005abe
commit d60b3daecb

View File

@ -592,10 +592,13 @@ class Privmsg(irclib.IrcCallback):
if self._original: if self._original:
self._original(irc, msg, args) self._original(irc, msg, args)
else: else:
raise ArgumentError cb = irc.getCallback('Misc')
cb.help(irc, msg, [self.name()])
if args: if args:
name = canonicalName(args[0]) name = canonicalName(args[0])
if self.isCommand(name): if name == canonicalName(self.name()):
handleBadArgs()
elif self.isCommand(name):
del args[0] del args[0]
method = getattr(self, name) method = getattr(self, name)
try: try: