|
|
@ -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") |
|
|
|