Converted to use tokenizedCommand rather than invalidCommand.

This commit is contained in:
Jeremy Fincher 2004-09-16 10:54:42 +00:00
parent 138b683d96
commit b0c00fb82f
2 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
elif error: elif error:
irc.error('No factoid matches that key.') irc.error('No factoid matches that key.')
def invalidCommand(self, irc, msg, tokens): def tokenizedCommand(self, irc, msg, tokens):
if ircutils.isChannel(msg.args[0]): if ircutils.isChannel(msg.args[0]):
channel = msg.args[0] channel = msg.args[0]
if self.registryValue('replyWhenInvalidCommand', channel): if self.registryValue('replyWhenInvalidCommand', channel):

View File

@ -335,7 +335,7 @@ class MoobotFactoids(callbacks.Privmsg):
newfact = plugins.standardSubstitute(irc, msg, newfact) newfact = plugins.standardSubstitute(irc, msg, newfact)
return (type, newfact) return (type, newfact)
def invalidCommand(self, irc, msg, tokens): def tokenizedCommand(self, irc, msg, tokens):
if '=~' in tokens: if '=~' in tokens:
self.changeFactoid(irc, msg, tokens) self.changeFactoid(irc, msg, tokens)
elif tokens and tokens[0] in ('no', 'no,'): elif tokens and tokens[0] in ('no', 'no,'):
@ -662,7 +662,7 @@ class MoobotFactoids(callbacks.Privmsg):
elif len(results) == 1 and \ elif len(results) == 1 and \
self.registryValue('showFactoidIfOnlyOneMatch', channel): self.registryValue('showFactoidIfOnlyOneMatch', channel):
key = results[0][0] key = results[0][0]
self.invalidCommand(irc, msg, [key]) self.tokenizedCommand(irc, msg, [key])
else: else:
keys = ['"%s"' % tup[0] for tup in results] keys = ['"%s"' % tup[0] for tup in results]
s = 'Key search for "%s" (%s found): %s' % \ s = 'Key search for "%s" (%s found): %s' % \