mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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 = table.lower()
|
||||
try:
|
||||
ircdb.users.getUser(msg.prefix).name
|
||||
name = ircdb.users.getUser(msg.prefix).name
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNotRegistered)
|
||||
return
|
||||
@ -338,8 +338,8 @@ class FunDB(callbacks.Privmsg):
|
||||
else:
|
||||
old_entry = cursor.fetchone()[0]
|
||||
new_entry = replacer(old_entry)
|
||||
sql = """UPDATE %ss SET %s=%%s WHERE id=%%s""" % (table, table)
|
||||
cursor.execute(sql, new_entry, id)
|
||||
sql = """UPDATE %ss SET %s=%%s, added_by=%%s WHERE id=%%s""" % (table, table)
|
||||
cursor.execute(sql, new_entry, name, id)
|
||||
self.db.commit()
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user