From 0a34794a3325e7a37defabda2a228065d0f07780 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 28 Oct 2003 06:09:05 +0000 Subject: [PATCH] Small stylistic change and removed the returns from invalidCommand. --- plugins/Dunno.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/Dunno.py b/plugins/Dunno.py index 5d11d9bf7..124742b46 100644 --- a/plugins/Dunno.py +++ b/plugins/Dunno.py @@ -86,11 +86,11 @@ class Dunno(callbacks.Privmsg): ORDER BY random() LIMIT 1""") if cursor.rowcount == 0: - return "No dunno's available, add some with dunnoadd." - dunno = cursor.fetchone()[0] - dunno = dunno.replace('$who', msg.nick) - irc.reply(msg, dunno, prefixName=False) - return True + irc.error(msg, 'No dunnos available, add some with dunno add.') + else: + dunno = cursor.fetchone()[0] + dunno = dunno.replace('$who', msg.nick) + irc.reply(msg, dunno, prefixName=False) def add(self, irc, msg, args): """ @@ -156,8 +156,8 @@ class Dunno(callbacks.Privmsg): if cursor.rowcount == 0: irc.error(msg, 'No dunnos with %r found.' % text) return - ids = [str(tup[0]) for tup in cursor.fetchall()] - s = "Dunno search for %r (%d found): %s" % \ + ids = [str(t[0]) for t in cursor.fetchall()] + s = 'Dunno search for %r (%d found): %s' % \ (text, len(ids), utils.commaAndify(ids)) irc.reply(msg, s)