Remove status, it's unuseful now
This commit is contained in:
parent
6d505099af
commit
5fb2b30349
15
pymaster.py
15
pymaster.py
@ -54,8 +54,6 @@ class PyMaster:
|
|||||||
self.addServerToList(data, addr)
|
self.addServerToList(data, addr)
|
||||||
elif( data[0] == MasterProtocol.removeServer ):
|
elif( data[0] == MasterProtocol.removeServer ):
|
||||||
self.removeServerFromList(data, addr)
|
self.removeServerFromList(data, addr)
|
||||||
elif( data[0] == MasterProtocol.statusRequest ):
|
|
||||||
self.sendStatus(data, addr)
|
|
||||||
else:
|
else:
|
||||||
logPrint("Unknown message: {0} from {1}:{2}".format(data, addr[0], addr[1]))
|
logPrint("Unknown message: {0} from {1}:{2}".format(data, addr[0], addr[1]))
|
||||||
|
|
||||||
@ -183,19 +181,6 @@ class PyMaster:
|
|||||||
|
|
||||||
serverEntry.setInfoString( serverInfo )
|
serverEntry.setInfoString( serverInfo )
|
||||||
|
|
||||||
def sendStatus( self, data, addr ):
|
|
||||||
logPrint("Status Request: from {0}:{1}".format(addr[0], addr[1]))
|
|
||||||
count = len(self.serverList)
|
|
||||||
|
|
||||||
packet = b'Server\t\t\tGame\tMap\t\tPlayers\tVersion\tChallenge\tCheck\n'
|
|
||||||
for i in self.serverList:
|
|
||||||
line = '{0}:{1}\t{2}\t{3}\t{4}/{5}\t{6}\t{7}\t{8}\n'.format(i.addr[0], i.addr[1],
|
|
||||||
i.gamedir, i.gamemap, i.players,
|
|
||||||
i.maxplayers, i.version, i.challenge, i.check)
|
|
||||||
packet += line.encode('latin_1')
|
|
||||||
self.sock.sendto(packet, addr)
|
|
||||||
|
|
||||||
|
|
||||||
def main( argv = None ):
|
def main( argv = None ):
|
||||||
if argv is None:
|
if argv is None:
|
||||||
argv = sys.argv
|
argv = sys.argv
|
||||||
|
Loading…
Reference in New Issue
Block a user