1
0
Fork 0
mirror of https://github.com/de2tla2f/pymaster.git synced 2024-11-24 20:01:27 +00:00

Remove status, it's unuseful now

This commit is contained in:
Alibek Omarov 2018-10-10 20:32:18 +03:00 committed by GitHub
parent 6d505099af
commit 5fb2b30349
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,8 +54,6 @@ class PyMaster:
self.addServerToList(data, addr)
elif( data[0] == MasterProtocol.removeServer ):
self.removeServerFromList(data, addr)
elif( data[0] == MasterProtocol.statusRequest ):
self.sendStatus(data, addr)
else:
logPrint("Unknown message: {0} from {1}:{2}".format(data, addr[0], addr[1]))
@ -183,19 +181,6 @@ class PyMaster:
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 ):
if argv is None:
argv = sys.argv