mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-03 16:39:25 +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:
|
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):
|
||||||
|
@ -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' % \
|
||||||
|
Loading…
Reference in New Issue
Block a user