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:
@@ -413,6 +413,7 @@ def main_loop(screen, args):
|
|||||||
ui.print_message(f"^3[^7{timestamp}^3]^7 Requesting connection info...\n")
|
ui.print_message(f"^3[^7{timestamp}^3]^7 Requesting connection info...\n")
|
||||||
rcon.send_command(b'zmq_stats_password')
|
rcon.send_command(b'zmq_stats_password')
|
||||||
rcon.send_command(b'net_port')
|
rcon.send_command(b'net_port')
|
||||||
|
if args.learn_names:
|
||||||
name_capture.request(rcon)
|
name_capture.request(rcon)
|
||||||
elif monitor_event and monitor_event[0] == zmq.EVENT_DISCONNECTED:
|
elif monitor_event and monitor_event[0] == zmq.EVENT_DISCONNECTED:
|
||||||
timestamp = time.strftime('%H:%M:%S')
|
timestamp = time.strftime('%H:%M:%S')
|
||||||
@@ -612,6 +613,7 @@ if __name__ == '__main__':
|
|||||||
# Apply config settings to args
|
# Apply config settings to args
|
||||||
args.config_log_level = config.get_log_level()
|
args.config_log_level = config.get_log_level()
|
||||||
args.max_history = config.get_max_history(MAX_COMMAND_HISTORY)
|
args.max_history = config.get_max_history(MAX_COMMAND_HISTORY)
|
||||||
|
args.learn_names = config.get_bool('behavior', 'learn_names', False)
|
||||||
|
|
||||||
# Handle --list
|
# Handle --list
|
||||||
if args.list:
|
if args.list:
|
||||||
|
|||||||
@@ -44,5 +44,9 @@ max_history = 10
|
|||||||
[behavior]
|
[behavior]
|
||||||
# Seconds to confirm quit (press Ctrl-C twice within this window)
|
# Seconds to confirm quit (press Ctrl-C twice within this window)
|
||||||
quit_timeout = 3.0
|
quit_timeout = 3.0
|
||||||
|
# Learn extra cvar/command names for autocomplete from the server.
|
||||||
|
# Sends cvarlist + cmdlist on connect: a large burst of messages that can
|
||||||
|
# lag the game server. Off by default; the built-in names always work.
|
||||||
|
learn_names = false
|
||||||
# Seconds before players respawn after death
|
# Seconds before players respawn after death
|
||||||
respawn_delay = 3.0
|
respawn_delay = 3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user