mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Changed all %d's to %s's
This commit is contained in:
parent
e5e507f3d9
commit
0011fff94e
@ -85,9 +85,7 @@ class Dunno(callbacks.Privmsg):
|
||||
FROM dunnos
|
||||
ORDER BY random()
|
||||
LIMIT 1""")
|
||||
if cursor.rowcount == 0:
|
||||
irc.error(msg, 'No dunnos available, add some with dunno add.')
|
||||
else:
|
||||
if cursor.rowcount != 0:
|
||||
dunno = cursor.fetchone()[0]
|
||||
dunno = dunno.replace('$who', msg.nick)
|
||||
irc.reply(msg, dunno, prefixName=False)
|
||||
@ -130,7 +128,7 @@ class Dunno(callbacks.Privmsg):
|
||||
FROM dunnos
|
||||
WHERE id = %s""" % dunno_id)
|
||||
if cursor.rowcount == 0:
|
||||
irc.error(msg, 'No dunno with id: %d' % dunno_id)
|
||||
irc.error(msg, 'No dunno with id: %s' % dunno_id)
|
||||
return
|
||||
(added_by, dunno) = cursor.fetchone()
|
||||
if not (ircdb.checkCapability(user_id, 'admin') or \
|
||||
@ -157,7 +155,7 @@ class Dunno(callbacks.Privmsg):
|
||||
irc.error(msg, 'No dunnos with %r found.' % text)
|
||||
return
|
||||
ids = [str(t[0]) for t in cursor.fetchall()]
|
||||
s = 'Dunno search for %r (%d found): %s' % \
|
||||
s = 'Dunno search for %r (%s found): %s' % \
|
||||
(text, len(ids), utils.commaAndify(ids))
|
||||
irc.reply(msg, s)
|
||||
|
||||
@ -175,10 +173,10 @@ class Dunno(callbacks.Privmsg):
|
||||
cursor = self.db.cursor()
|
||||
cursor.execute("""SELECT dunno FROM dunnos WHERE id = %s""", id)
|
||||
if cursor.rowcount == 0:
|
||||
irc.error(msg, 'No dunno found with id #%d' % id)
|
||||
irc.error(msg, 'No dunno found with id #%s' % id)
|
||||
return
|
||||
dunno = cursor.fetchone()[0]
|
||||
irc.reply(msg, "Dunno #%d: %r" % (id, dunno))
|
||||
irc.reply(msg, "Dunno #%s: %r" % (id, dunno))
|
||||
|
||||
Class = Dunno
|
||||
|
||||
|
@ -489,7 +489,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.reply(msg, "No factoids by %r found." % author)
|
||||
return
|
||||
keys = [repr(tup[0]) for tup in cursor.fetchall()]
|
||||
s = "Author search for %r (%d found): %s" % \
|
||||
s = "Author search for %r (%s found): %s" % \
|
||||
(author, len(keys), utils.commaAndify(keys))
|
||||
irc.reply(msg, s)
|
||||
|
||||
@ -509,7 +509,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.reply(msg, "No keys matching %r found." % search)
|
||||
return
|
||||
keys = [repr(tup[0]) for tup in cursor.fetchall()]
|
||||
s = "Key search for %r (%d found): %s" % \
|
||||
s = "Key search for %r (%s found): %s" % \
|
||||
(search, len(keys), utils.commaAndify(keys))
|
||||
irc.reply(msg, s)
|
||||
|
||||
@ -529,7 +529,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.reply(msg, "No values matching %r found." % search)
|
||||
return
|
||||
keys = [repr(tup[0]) for tup in cursor.fetchall()]
|
||||
s = "Value search for %r (%d found): %s" % \
|
||||
s = "Value search for %r (%s found): %s" % \
|
||||
(search, len(keys), utils.commaAndify(keys))
|
||||
irc.reply(msg, s)
|
||||
|
||||
|
@ -286,11 +286,11 @@ class Todo(callbacks.Privmsg):
|
||||
cursor.execute("""SELECT userid, priority FROM todo
|
||||
WHERE id = %s AND active = 1""", id)
|
||||
if cursor.rowcount == 0:
|
||||
irc.error(msg, 'No note with id %d' % id)
|
||||
irc.error(msg, 'No note with id %s' % id)
|
||||
return
|
||||
(userid, oldpriority) = cursor.fetchone()
|
||||
if userid != user_id:
|
||||
irc.error(msg, 'Todo #%d does not belong to you.' % id)
|
||||
irc.error(msg, 'Todo #%s does not belong to you.' % id)
|
||||
return
|
||||
# If we make it here, we're okay
|
||||
cursor.execute("""UPDATE todo SET priority = %s
|
||||
|
Loading…
Reference in New Issue
Block a user