Browse Source

KPACUBO

master
gsd 2 years ago
parent
commit
1a70330080
  1. 4
      ext/python-a2s-rcon-api/service.py

4
ext/python-a2s-rcon-api/service.py

@ -94,12 +94,16 @@ class SourceBackend:
if(request.password == None):
return Response(status_code = 403)
try:
status_lines:str = await VALVE_SERVER_RCON(
"status",
host = request.address,
port = request.port,
passwd = request.password
)
except UnicodeDecodeError as err:
print(f"Cannot execute 'status' on {request.address}:{request.port}, error: {err}")
return Response(status_code = 500)
try:
start_index = status_lines.index("# userid")

Loading…
Cancel
Save