Add timestamps to game events and connection messages
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <[email protected]>
This commit is contained in:
+5
-1
@@ -72,7 +72,11 @@ class EventParser:
|
||||
|
||||
handler = handler_map.get(event_type)
|
||||
if handler:
|
||||
return handler(data)
|
||||
formatted = handler(data)
|
||||
if formatted:
|
||||
timestamp = time.strftime('%H:%M:%S')
|
||||
return f"^3[^7{timestamp}^3]^7 {formatted}"
|
||||
return None
|
||||
else:
|
||||
# Unknown event
|
||||
logger.debug(f'Unknown event type: {event_type}')
|
||||
|
||||
Reference in New Issue
Block a user