From 1502ccf3aca22dffc64e3a392190274c2e8fcf77 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sat, 5 Oct 2024 15:31:41 -0700 Subject: [PATCH] enhance? --- etc/report_generator.py | 2 +- etc/report_generator5.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/report_generator.py b/etc/report_generator.py index a07cf00..192df4f 100644 --- a/etc/report_generator.py +++ b/etc/report_generator.py @@ -106,7 +106,7 @@ def parse_log_file(file_path): if 'Bot detected Commands' in line or 'LLM Query:' in line or 'PlayingGame' in line: # get the command and user from the line command = re.search(r"'cmd': '(\w+)'", line) - user = re.search(r"From: (\w+)", line) + user = re.search(r"From: (.+)$", line) if 'LLM Query:' in line: log_data['command_counts']['LLM Query'] += 1 diff --git a/etc/report_generator5.py b/etc/report_generator5.py index 676d9cd..bd12d1f 100644 --- a/etc/report_generator5.py +++ b/etc/report_generator5.py @@ -108,7 +108,7 @@ def parse_log_file(file_path): if 'Bot detected Commands' in line or 'LLM Query:' in line or 'PlayingGame' in line: # get the command and user from the line command = re.search(r"'cmd': '(\w+)'", line) - user = re.search(r"From: (\w+)", line) + user = re.search(r"From: (.+)$", line) if 'LLM Query:' in line: log_data['command_counts']['LLM Query'] += 1