mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 22:24:20 +01:00
dbchange now updates the added_by field
This commit is contained in:
parent
292bb2550e
commit
b95985c3aa
@ -310,7 +310,7 @@ class FunDB(callbacks.Privmsg):
|
|||||||
(table, id, regexp) = privmsgs.getArgs(args, needed=3)
|
(table, id, regexp) = privmsgs.getArgs(args, needed=3)
|
||||||
table = table.lower()
|
table = table.lower()
|
||||||
try:
|
try:
|
||||||
ircdb.users.getUser(msg.prefix).name
|
name = ircdb.users.getUser(msg.prefix).name
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, conf.replyNotRegistered)
|
irc.error(msg, conf.replyNotRegistered)
|
||||||
return
|
return
|
||||||
@ -338,8 +338,8 @@ class FunDB(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
old_entry = cursor.fetchone()[0]
|
old_entry = cursor.fetchone()[0]
|
||||||
new_entry = replacer(old_entry)
|
new_entry = replacer(old_entry)
|
||||||
sql = """UPDATE %ss SET %s=%%s WHERE id=%%s""" % (table, table)
|
sql = """UPDATE %ss SET %s=%%s, added_by=%%s WHERE id=%%s""" % (table, table)
|
||||||
cursor.execute(sql, new_entry, id)
|
cursor.execute(sql, new_entry, name, id)
|
||||||
self.db.commit()
|
self.db.commit()
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user