mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Converted to use tokenizedCommand rather than invalidCommand.
This commit is contained in:
parent
138b683d96
commit
b0c00fb82f
@ -189,7 +189,7 @@ class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||
elif error:
|
||||
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]):
|
||||
channel = msg.args[0]
|
||||
if self.registryValue('replyWhenInvalidCommand', channel):
|
||||
|
@ -335,7 +335,7 @@ class MoobotFactoids(callbacks.Privmsg):
|
||||
newfact = plugins.standardSubstitute(irc, msg, newfact)
|
||||
return (type, newfact)
|
||||
|
||||
def invalidCommand(self, irc, msg, tokens):
|
||||
def tokenizedCommand(self, irc, msg, tokens):
|
||||
if '=~' in tokens:
|
||||
self.changeFactoid(irc, msg, tokens)
|
||||
elif tokens and tokens[0] in ('no', 'no,'):
|
||||
@ -662,7 +662,7 @@ class MoobotFactoids(callbacks.Privmsg):
|
||||
elif len(results) == 1 and \
|
||||
self.registryValue('showFactoidIfOnlyOneMatch', channel):
|
||||
key = results[0][0]
|
||||
self.invalidCommand(irc, msg, [key])
|
||||
self.tokenizedCommand(irc, msg, [key])
|
||||
else:
|
||||
keys = ['"%s"' % tup[0] for tup in results]
|
||||
s = 'Key search for "%s" (%s found): %s' % \
|
||||
|
Loading…
Reference in New Issue
Block a user