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

Force lowercase gamedirs. Engine doesn't care about gamedir case, so should do master server

This commit is contained in:
Alibek Omarov 2018-12-30 14:43:52 +03:00
parent 0ca6f55e13
commit 5aa6d9a644
2 changed files with 3 additions and 3 deletions

View file

@ -82,7 +82,7 @@ class PyMaster:
try: try:
key = split[i + 1] key = split[i + 1]
if( split[i] == 'gamedir' ): if( split[i] == 'gamedir' ):
gamedir = key gamedir = key.lower() # keep gamedir in lowercase
elif( split[i] == 'nat' ): elif( split[i] == 'nat' ):
nat = int(key) nat = int(key)
elif( split[i] == 'clver' ): elif( split[i] == 'clver' ):

View file

@ -28,7 +28,7 @@ class ServerEntry:
if( split[i] == 'challenge' ): if( split[i] == 'challenge' ):
self.challenge2 = int(key) self.challenge2 = int(key)
elif( split[i] == 'gamedir' ): elif( split[i] == 'gamedir' ):
self.gamedir = key self.gamedir = key.lower() # keep gamedir lowercase
elif( split[i] == 'protocol' ): elif( split[i] == 'protocol' ):
self.protocol = int(key) self.protocol = int(key)
elif( split[i] == 'players' ): elif( split[i] == 'players' ):
@ -80,4 +80,4 @@ class ServerEntry:
# Remove server after this time. # Remove server after this time.
# This maybe not instant # This maybe not instant
self.die = time() + 600.0 self.die = time() + 600.0