mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-10-30 22:01:57 +01:00
enhance
This commit is contained in:
1 parent
99b4e5a1b5
commit
d57dfb1055
2 files changed
+10
-3
No files matched your search
@@ -114,9 +114,12 @@ def parse_log_file(file_path):
|
||||
for word in shameWordList:
|
||||
if word in line.lower():
|
||||
if line not in log_data['shameList']:
|
||||
log_data['shameList'].append(line)
|
||||
line = line.replace('Ignoring Message:', '')
|
||||
line = line.replace('|', '')
|
||||
line = line.replace('INFO', '')
|
||||
line = line.replace('DEBUG', '')
|
||||
log_data['shameList'].append(0, line)
|
||||
|
||||
|
||||
# get the user who sent the message
|
||||
user_match = re.search(r'From: (\w+)', line)
|
||||
if user_match:
|
||||
|
||||
@@ -124,7 +124,11 @@ def parse_log_file(file_path):
|
||||
for word in shameWordList:
|
||||
if word in line.lower():
|
||||
if line not in log_data['shameList']:
|
||||
log_data['shameList'].append(line)
|
||||
line = line.replace('Ignoring Message:', '')
|
||||
line = line.replace('|', '')
|
||||
line = line.replace('INFO', '')
|
||||
line = line.replace('DEBUG', '')
|
||||
log_data['shameList'].append(0, line)
|
||||
|
||||
# get the user who sent the message
|
||||
user_match = re.search(r'From: (\w+)', line)
|
||||
|
||||
Reference in new issue
Block a user