aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2016-03-27 11:44:44 +0200
committerTollef Fog Heen <tfheen@err.no>2016-03-27 11:46:30 +0200
commitbb2903e6a9167ea20cf03cffc2dad9daaef6eee4 (patch)
tree5699a6c1411c533b8cc21f2ea1da321e31700683
parentb1770652b856407f76095e5a513631c340d5f072 (diff)
downloadwee-slack-bb2903e6a9167ea20cf03cffc2dad9daaef6eee4.tar.gz
Add more tags to message lines
set nick_$user for all buffer lines, and set log1 for message lines. Fixes: #166
-rw-r--r--wee_slack.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 4a1d000..4c8316a 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -612,19 +612,21 @@ class Channel(object):
"""
set_read_marker = False
time_float = float(time)
+ tags = "nick_" + user
+ # XXX: we should not set log1 for robots.
if time_float != 0 and self.last_read >= time_float:
- tags = "no_highlight,notify_none,logger_backlog_end"
+ tags += ",no_highlight,notify_none,logger_backlog_end"
set_read_marker = True
elif message.find(self.server.nick.encode('utf-8')) > -1:
- tags = "notify_highlight"
+ tags = ",notify_highlight,log1"
elif user != self.server.nick and self.name in self.server.users:
- tags = "notify_private,notify_message"
+ tags = ",notify_private,notify_message,log1"
elif self.muted:
- tags = "no_highlight,notify_none,logger_backlog_end"
+ tags = ",no_highlight,notify_none,logger_backlog_end"
elif user in [x.strip() for x in w.prefix("join"), w.prefix("quit")]:
- tags = "irc_smart_filter"
+ tags = ",irc_smart_filter"
else:
- tags = "notify_message"
+ tags = ",notify_message,log1"
#don't write these to local log files
#tags += ",no_log"
time_int = int(time_float)