From 620dd849abfe1b3f265f98e6e07bcf8f63bccaa1 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Mon, 19 Oct 2020 02:53:47 +0000 Subject: [PATCH] Improve log style NAMES aren't included in the table at all now because they otherwise mess up the :nth-child(even) rule. --- irclog.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/irclog.py b/irclog.py index 098d909..5c51b8a 100644 --- a/irclog.py +++ b/irclog.py @@ -808,11 +808,14 @@ class Storage: class WebServer: logger = logging.getLogger('irclog.WebServer') logStyleTag = '' def __init__(self, config): @@ -935,6 +938,9 @@ class WebServer: # withDate: whether to include the date with the time of the log line ret = [] for path, ts, command, content in lines: + if command == 'NAMES': + # Hidden as WHOX provides more information + continue d = datetime.datetime.utcfromtimestamp(ts).replace(tzinfo = datetime.timezone.utc) date = f'{d:%Y-%m-%d }' if withDate else '' lineId = hashlib.md5(f'{ts} {command} {content}'.encode('utf-8')).hexdigest()[:8]