mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
Made sure to depluralize the command name.
This commit is contained in:
parent
6e46263279
commit
ee5de6e0d7
@ -115,10 +115,11 @@ class Lookup(callbacks.Privmsg):
|
||||
|
||||
Adds a lookup for <name> with the key/value pairs specified in the
|
||||
colon-delimited file specified by <filename>. <filename> is searched
|
||||
for in conf.dataDir. Use 'lookup <name> <key>' to get the value of
|
||||
the key in the file.
|
||||
for in conf.dataDir. If <name> is not singular, we try to make it
|
||||
singular before creating the command.
|
||||
"""
|
||||
(name, filename) = privmsgs.getArgs(args, required=2)
|
||||
name = utils.depluralize(name)
|
||||
db = getDb()
|
||||
cursor = db.cursor()
|
||||
try:
|
||||
@ -150,7 +151,7 @@ class Lookup(callbacks.Privmsg):
|
||||
db.commit()
|
||||
self.addCommand(name)
|
||||
cb = irc.getCallback('Alias')
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
irc.reply(msg, '%s (lookup %s added)' % (conf.replySuccess, name))
|
||||
|
||||
def addCommand(self, name):
|
||||
def f(self, irc, msg, args):
|
||||
|
Loading…
Reference in New Issue
Block a user