diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-11-17 18:38:17 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-11-17 18:38:17 +0000 |
commit | 585b7ca28ea9424c0e894af7cc216ae8afdb2192 (patch) | |
tree | ff356548ef573a1675e628d5fcdfc757e7ca64a5 /wee_slack.py | |
parent | 133f2d9d603a6ac80409b3698e172bbb0a3727af (diff) | |
parent | d6652aec633db0e5e5a78fb2f7d211b8b4e8c96a (diff) | |
download | wee-slack-585b7ca28ea9424c0e894af7cc216ae8afdb2192.tar.gz |
Merge branch 'master' into 114_better_buffer_mod
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index f8ee834..7198ba3 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -353,6 +353,7 @@ class Channel(object): self.last_received = None self.messages = [] self.scrolling = False + self.last_active_user = None self.muted = False if active: self.create_buffer() @@ -598,10 +599,17 @@ class Channel(object): #tags += ",no_log" time_int = int(time_float) if self.channel_buffer: - if self.server.users.find(user): - name = self.server.users.find(user).formatted_name() + prefix_same_nick = w.config_string(w.config_get('weechat.look.prefix_same_nick')) + if user == self.last_active_user and prefix_same_nick != "": + name = prefix_same_nick else: - name = user + if self.server.users.find(user): + name = self.server.users.find(user).formatted_name() + self.last_active_user = user + # XXX: handle bots properly here. + else: + name = user + self.last_active_user = None name = name.decode('utf-8') #colorize nicks in each line chat_color = w.config_string(w.config_get('weechat.color.chat')) |