Fix some small issues

This commit is contained in:
polaris
2014-05-20 12:50:20 -04:00
parent 04f6b1ac04
commit c9d525cc02
3 changed files with 5 additions and 5 deletions

View File

@@ -285,7 +285,7 @@ class Gamestats(LineReceiver):
profile_data = None
if 'data' in profile:
if profile != None and 'data' in profile:
profile_data = gs_query.parse_gamespy_message("\\prof\\" + profile['data'] + "\\final\\")
if profile_data != None:

View File

@@ -152,11 +152,11 @@ class GameSpyNatNegServer(object):
logger.log(logging.DEBUG, "Received connected command from %s:%s..." % (addr[0], addr[1]))
if gameid not in self.session_list:
pass
continue
if session_id not in self.session_list[gameid]:
pass
continue
if client_id not in self.session_list[gameid][session_id]:
pass
continue
self.session_list[gameid][session_id][client_id]['connected'] = True

View File

@@ -252,7 +252,7 @@ class GameSpyQRServer(object):
self.sessions[session_id].sent_challenge = True
if k['publicip'] == "0": #and k['dwc_hoststate'] == "2": # When dwc_hoststate == 2 then it doesn't send an IP, so calculate it ourselves
if 'publicip' in k and k['publicip'] == "0": #and k['dwc_hoststate'] == "2": # When dwc_hoststate == 2 then it doesn't send an IP, so calculate it ourselves
if self.sessions[session_id].console != 0:
k['publicip'] = str(ctypes.c_int32(utils.get_int_be(bytearray([int(x) for x in address[0].split('.')]), 0)).value) # Wii
else: