mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Added notification of which record number was added when adddb is called.
This commit is contained in:
parent
f98d1f9db5
commit
11c7124203
@ -43,6 +43,7 @@ import os.path
|
||||
import sqlite
|
||||
|
||||
import conf
|
||||
import utils
|
||||
import ircmsgs
|
||||
import ircutils
|
||||
import privmsgs
|
||||
@ -196,7 +197,11 @@ class FunDB(callbacks.Privmsg):
|
||||
sql = """INSERT INTO %ss VALUES (NULL, %%s)""" % table
|
||||
cursor.execute(sql, s)
|
||||
self.db.commit()
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
sql = """SELECT id FROM %ss WHERE %s=%%s""" % (table, table)
|
||||
cursor.execute(sql, s)
|
||||
id = cursor.fetchone()[0]
|
||||
response = [conf.replySuccess,'(%s #%s)' % (table,id)]
|
||||
irc.reply(msg, ' '.join(response))
|
||||
|
||||
def removedb(self, irc, msg, args):
|
||||
"""<lart|excuse|insult|praise> <id>
|
||||
|
Loading…
x
Reference in New Issue
Block a user