summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-11-06 21:22:59 +0100
committermathieui <mathieui@mathieui.net>2011-11-06 21:22:59 +0100
commit14c05b2deeaeb56c1f14dcfeecfcfff2a67fe835 (patch)
tree19e8e4f95bf252701a817c4d544c319a18739dd3 /src
parentc3c67b5e0afec8b322b8f08aa76b8e35c24bc23b (diff)
downloadpoezio-14c05b2deeaeb56c1f14dcfeecfcfff2a67fe835.tar.gz
poezio-14c05b2deeaeb56c1f14dcfeecfcfff2a67fe835.tar.bz2
poezio-14c05b2deeaeb56c1f14dcfeecfcfff2a67fe835.tar.xz
poezio-14c05b2deeaeb56c1f14dcfeecfcfff2a67fe835.zip
Make private join/parts work properly
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 71063007..e40a8f05 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1345,12 +1345,12 @@ class PrivateTab(ChatTab):
"""
self.activate()
tab = self.core.get_tab_by_name(JID(self.name).bare, MucTab)
- color = None
- if tab:
+ color = 3
+ if tab and config.get('display_user_color_in_join_part', ''):
user = tab.get_user_by_name(nick)
if user:
- color = user.color
- self.add_message('\x194}%(spec)s \x19%(color)d}%(nick)s\x195} joined the room' % {'nick':nick, 'color': color or 3, 'spec':get_theme().CHAR_JOIN})
+ color = user.color[0]
+ self.add_message('\x194}%(spec)s \x19%(color)d}%(nick)s\x195} joined the room' % {'nick':nick, 'color': color, 'spec':get_theme().CHAR_JOIN})
if self.core.current_tab() is self:
self.refresh()
self.core.doupdate()