def updateLocation(cursor, userid, location): queryDict = { DC.UserID: userid, DC.Location: location, } query = Q.UpdateLocation % queryDict pgDB.execute(cursor, query)
def updateUserLocation(cursor, userid, roomid): queryDict = { DC.UserID: userid, DC.RoomID: roomid, } query = Q.UpdateUserRoomID % queryDict pgDB.execute(cursor, query)
def createUser(cursor, nickname, charname, password, userlevel = Player): password = sha.new(password).hexdigest() queryDict = { DC.UserID: userid, DC.UserLevel: userlevel, DC.NickName: nickname, DC.FullName: charname, DC.Password: password, } query = Q.CreateUser % queryDict pgDB.execute(query)
def createUser(cursor, nickname, charname, password, userlevel=Player): password = sha.new(password).hexdigest() queryDict = { DC.UserID: userid, DC.UserLevel: userlevel, DC.NickName: nickname, DC.FullName: charname, DC.Password: password, } query = Q.CreateUser % queryDict pgDB.execute(query)
def setThreadID(cursor, userid, threadid): query = Q.SetThreadID % {DC.UserID: userid, DC.CurrentThreadID: threadid} pgDB.execute(cursor, query)
def clearLoggedInUsers(cursor): query = Q.ClearLoggedInUsers pgDB.execute(cursor, query)