Make server name learning opt-in to avoid lagging the game server

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
This commit is contained in:
Debian
2026-09-16 21:35:10 +02:00
co-authored by Sisyphus
parent 190152733e
commit 9ea4aa122a
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -413,7 +413,8 @@ def main_loop(screen, args):
ui.print_message(f"^3[^7{timestamp}^3]^7 Requesting connection info...\n")
rcon.send_command(b'zmq_stats_password')
rcon.send_command(b'net_port')
name_capture.request(rcon)
if args.learn_names:
name_capture.request(rcon)
elif monitor_event and monitor_event[0] == zmq.EVENT_DISCONNECTED:
timestamp = time.strftime('%H:%M:%S')
ui.print_message(f"^3[^7{timestamp}^3] ^8^1Disconnected from server - waiting for reconnect...^0^7\n")
@@ -612,6 +613,7 @@ if __name__ == '__main__':
# Apply config settings to args
args.config_log_level = config.get_log_level()
args.max_history = config.get_max_history(MAX_COMMAND_HISTORY)
args.learn_names = config.get_bool('behavior', 'learn_names', False)
# Handle --list
if args.list: