mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-02 15:44:06 +01:00
Small stylistic change and removed the returns from invalidCommand.
This commit is contained in:
parent
86a3746994
commit
0a34794a33
@ -86,11 +86,11 @@ class Dunno(callbacks.Privmsg):
|
|||||||
ORDER BY random()
|
ORDER BY random()
|
||||||
LIMIT 1""")
|
LIMIT 1""")
|
||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
return "No dunno's available, add some with dunnoadd."
|
irc.error(msg, 'No dunnos available, add some with dunno add.')
|
||||||
|
else:
|
||||||
dunno = cursor.fetchone()[0]
|
dunno = cursor.fetchone()[0]
|
||||||
dunno = dunno.replace('$who', msg.nick)
|
dunno = dunno.replace('$who', msg.nick)
|
||||||
irc.reply(msg, dunno, prefixName=False)
|
irc.reply(msg, dunno, prefixName=False)
|
||||||
return True
|
|
||||||
|
|
||||||
def add(self, irc, msg, args):
|
def add(self, irc, msg, args):
|
||||||
"""<text>
|
"""<text>
|
||||||
@ -156,8 +156,8 @@ class Dunno(callbacks.Privmsg):
|
|||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
irc.error(msg, 'No dunnos with %r found.' % text)
|
irc.error(msg, 'No dunnos with %r found.' % text)
|
||||||
return
|
return
|
||||||
ids = [str(tup[0]) for tup in cursor.fetchall()]
|
ids = [str(t[0]) for t in cursor.fetchall()]
|
||||||
s = "Dunno search for %r (%d found): %s" % \
|
s = 'Dunno search for %r (%d found): %s' % \
|
||||||
(text, len(ids), utils.commaAndify(ids))
|
(text, len(ids), utils.commaAndify(ids))
|
||||||
irc.reply(msg, s)
|
irc.reply(msg, s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user