Render locally what rcon say broadcasts print on the server
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
This commit is contained in:
@@ -349,6 +349,13 @@ def handle_user_input(ui, rcon):
|
||||
|
||||
rcon.send_command(command)
|
||||
|
||||
# The server does not echo rcon-originated says back on the console
|
||||
# stream, so render locally what players see in-game
|
||||
stripped = command.strip()
|
||||
if stripped.lower().startswith('say '):
|
||||
timestamp = time.strftime('%H:%M:%S')
|
||||
ui.print_message(f"^3[^7{timestamp}^3]^7 Server: {stripped[4:]}\n")
|
||||
|
||||
|
||||
def handle_stats_stream(stats_conn, stats_check_counter, event_parser, ui, game_state):
|
||||
"""Poll and process stats stream events"""
|
||||
|
||||
Reference in New Issue
Block a user