mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-08-22 02:24:59 -05:00
Updated devname field in DB
This commit is contained in:
@@ -31,7 +31,7 @@ class GamespyDatabase(object):
|
||||
# but I'm not good with databases and I'm not 100% positive that, for instance, that all
|
||||
# user id's will be ints, or all passwords will be ints, etc, despite not seeing any
|
||||
# evidence yet to say otherwise as far as Nintendo DS games go.
|
||||
q = "CREATE TABLE users (profileid INT, userid TEXT, password TEXT, gsbrcd TEXT, email TEXT, uniquenick TEXT, pid TEXT, lon TEXT, lat TEXT, loc TEXT, firstname TEXT, lastname TEXT, stat TEXT, partnerid TEXT, console INT, csnum TEXT, cfc TEXT, bssid TEXT, devname TEXT, birth TEXT, gameid TEXT, enabled INT, zipcode TEXT, aim TEXT)"
|
||||
q = "CREATE TABLE users (profileid INT, userid TEXT, password TEXT, gsbrcd TEXT, email TEXT, uniquenick TEXT, pid TEXT, lon TEXT, lat TEXT, loc TEXT, firstname TEXT, lastname TEXT, stat TEXT, partnerid TEXT, console INT, csnum TEXT, cfc TEXT, bssid TEXT, devname BLOB, birth TEXT, gameid TEXT, enabled INT, zipcode TEXT, aim TEXT)"
|
||||
logger.log(-1, q)
|
||||
c.execute(q)
|
||||
|
||||
@@ -410,6 +410,10 @@ class GamespyDatabase(object):
|
||||
|
||||
c.execute(q, [userid])
|
||||
r = self.get_dict(c.fetchone())
|
||||
|
||||
if "devname" in data:
|
||||
data["devname"] = gs_utils.base64_encode(data["devname"])
|
||||
|
||||
data = json.dumps(data)
|
||||
|
||||
if r == None: # no row, add it
|
||||
|
||||
@@ -276,6 +276,7 @@ class PlayerSession(LineReceiver):
|
||||
def perform_logout(self, data_parsed):
|
||||
self.log(logging.INFO, "Session %s has logged off" % (data_parsed['sesskey']))
|
||||
self.db.delete_session(data_parsed['sesskey'])
|
||||
self.transport.loseConnection()
|
||||
|
||||
def perform_getprofile(self, data_parsed):
|
||||
#profile = self.db.get_profile_from_session_key(data_parsed['sesskey'])
|
||||
|
||||
Reference in New Issue
Block a user