From 52a42e931a3a72466e86cc0c90524de7a4c67b20 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 20 Dec 2020 17:54:17 +0000 Subject: [PATCH] Display any unknown log commands in grey --- irclog.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/irclog.py b/irclog.py index 43d84ac..fd22d7c 100644 --- a/irclog.py +++ b/irclog.py @@ -28,6 +28,12 @@ logger = logging.getLogger('irclog') SSL_CONTEXTS = {'yes': True, 'no': False, 'insecure': ssl.SSLContext()} messageConnectionClosed = object() # Signals that the connection was closed by either the bot or the server messageEOF = object() # Special object to signal the end of messages to Storage +LOG_COMMANDS = [ + # IRC protocol(-ish) + 'JOIN', 'QUIT', 'PART', 'KICK', 'NICK', 'ACCOUNT', 'MODE', 'TOPIC', 'TOPICWHO', 'NAMES', 'WHOX', 'NOTICE', 'PRIVMSG', + # Connection lost + 'CONNCLOSED', + ] def get_month_str(ts = None): @@ -832,6 +838,7 @@ class WebServer: 'tr.command_QUIT, tr.command_PART, tr.command_KICK, tr.command_CONNCLOSED { color: red; }', 'tr.command_NICK, tr.command_ACCOUNT, tr.command_MODE, tr.command_TOPIC, tr.command_TOPICWHO, tr.command_WHOX { color: grey; }', 'tr.command_NOTICE td:nth-child(3) { font-style: italic; }', + 'tr.command_UNKNOWN { color: grey; }', ]) + '' generalStyleTag = '