mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Fix Factoids
This commit is contained in:
parent
6e6fd58ea7
commit
3582286658
@ -284,7 +284,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
if cursor.rowcount == 0:
|
if cursor.rowcount == 0:
|
||||||
irc.error(_('There is no such factoid.'))
|
irc.error(_('There is no such factoid.'))
|
||||||
elif cursor.rowcount == 1 or number is True:
|
elif cursor.rowcount == 1 or number is True:
|
||||||
(id, _) = cursor.fetchone()
|
(id, foo) = cursor.fetchone()
|
||||||
cursor.execute("""DELETE FROM factoids WHERE key_id=%s""", id)
|
cursor.execute("""DELETE FROM factoids WHERE key_id=%s""", id)
|
||||||
cursor.execute("""DELETE FROM keys WHERE key LIKE %s""", key)
|
cursor.execute("""DELETE FROM keys WHERE key LIKE %s""", key)
|
||||||
db.commit()
|
db.commit()
|
||||||
@ -293,7 +293,7 @@ class Factoids(callbacks.Plugin, plugins.ChannelDBHandler):
|
|||||||
if number is not None:
|
if number is not None:
|
||||||
results = cursor.fetchall()
|
results = cursor.fetchall()
|
||||||
try:
|
try:
|
||||||
(_, id) = results[number-1]
|
(foo, id) = results[number-1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
irc.error(_('Invalid factoid number.'))
|
irc.error(_('Invalid factoid number.'))
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user