From e5e63d47255be908daa5bbb004d54b0f6c595c3a Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 8 Jul 2013 21:41:36 +0200 Subject: Prevent messages with typ=0 from being logged (new typ value) --- src/logger.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logger.py b/src/logger.py index 79d5296d..3fced6c1 100644 --- a/src/logger.py +++ b/src/logger.py @@ -169,9 +169,14 @@ class Logger(object): def log_message(self, jid, nick, msg, date=None, typ=1): """ log the message in the appropriate jid's file - type: 1 = Message + type: + 0 = Don’t log + 1 = Message 2 = Status/whatever """ + if not typ: + return True + jid = str(jid).replace('/', '\\') if config.get_by_tabname('use_log', 'false', jid) != 'true': return True -- cgit v1.2.3