summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-07-08 21:41:36 +0200
committermathieui <mathieui@mathieui.net>2013-08-04 14:50:57 +0200
commite5e63d47255be908daa5bbb004d54b0f6c595c3a (patch)
tree208b4dfee3f680fa2509a7569b0dfb804dd60eaf /src
parent7538093a07bbe65ed17a1c305a8fa98bccac9d95 (diff)
downloadpoezio-e5e63d47255be908daa5bbb004d54b0f6c595c3a.tar.gz
poezio-e5e63d47255be908daa5bbb004d54b0f6c595c3a.tar.bz2
poezio-e5e63d47255be908daa5bbb004d54b0f6c595c3a.tar.xz
poezio-e5e63d47255be908daa5bbb004d54b0f6c595c3a.zip
Prevent messages with typ=0 from being logged
(new typ value)
Diffstat (limited to 'src')
-rw-r--r--src/logger.py7
1 files changed, 6 insertions, 1 deletions
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