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:
parent
6d505099af
commit
5fb2b30349
15
pymaster.py
15
pymaster.py
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue