The bot now uses a lowercase version of the connection name as the name of the database - RENAME YOUR OLD DATABASE

This commit is contained in:
Luke Rogers 2012-10-12 20:45:18 +13:00
parent 264b765831
commit 56a6204dfb

View file

@ -9,7 +9,7 @@ def get_db_connection(conn, name=''):
"returns an sqlite3 connection to a persistent database" "returns an sqlite3 connection to a persistent database"
if not name: if not name:
name = '%s.%s.db' % (conn.nick, conn.server) name = '{}.db'.format(conn.name)
threadid = thread.get_ident() threadid = thread.get_ident()
if name in threaddbs and threadid in threaddbs[name]: if name in threaddbs and threadid in threaddbs[name]: