From 71111340df96d61ae1242a71fe7962a1f1be8a20 Mon Sep 17 00:00:00 2001 From: Toad King Date: Fri, 18 Apr 2014 01:59:02 -0400 Subject: [PATCH] fix nas_logins entries not being reused when possible --- gamespy/gs_database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamespy/gs_database.py b/gamespy/gs_database.py index a901780..afaecfb 100644 --- a/gamespy/gs_database.py +++ b/gamespy/gs_database.py @@ -393,11 +393,11 @@ class GamespyDatabase(object): for r in c.execute(q, [authtoken]): authtoken = "NDS" + utils.generate_random_str(size) - q = "SELECT * FROM nas_logins WHERE userid LIKE ?" + q = "SELECT * FROM nas_logins WHERE userid = ?" q2 = q.replace("?", "%s") % (userid) logger.log(-1, q2) - c.execute(q, [authtoken]) + c.execute(q, [userid]) r = self.get_dict(c.fetchone()) if r == None: # no row, add it