summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-02-14 02:53:31 +0100
committermathieui <mathieui@mathieui.net>2012-02-14 02:53:31 +0100
commit0f5ba0a7119ab6d2aa61e436fa19a8046ffbf712 (patch)
tree0a055f32539ef9527fd038801744c1adb3d0c7cb /src/tabs.py
parentb489b68e209d578c92e84d21940ceed2fb75ee65 (diff)
downloadpoezio-0f5ba0a7119ab6d2aa61e436fa19a8046ffbf712.tar.gz
poezio-0f5ba0a7119ab6d2aa61e436fa19a8046ffbf712.tar.bz2
poezio-0f5ba0a7119ab6d2aa61e436fa19a8046ffbf712.tar.xz
poezio-0f5ba0a7119ab6d2aa61e436fa19a8046ffbf712.zip
Fixes #2310
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 365f19c0..c98bbed4 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -801,25 +801,36 @@ class MucTab(ChatTab):
color_participant = get_theme().COLOR_USER_PARTICIPANT[0]
color_information = get_theme().COLOR_INFORMATION_TEXT[0]
visitors, moderators, participants, others = [], [], [], []
+ aff = {
+ 'owner': lambda: get_theme().CHAR_AFFILIATION_OWNER,
+ 'admin': lambda: get_theme().CHAR_AFFILIATION_ADMIN,
+ 'member': lambda: get_theme().CHAR_AFFILIATION_MEMBER,
+ 'none': lambda: get_theme().CHAR_AFFILIATION_NONE,
+ }
+
for user in self.users:
if user.role == 'visitor':
- visitors.append(user.nick)
+ visitors.append((user.nick, aff[user.affiliation]()))
elif user.role == 'participant':
- participants.append(user.nick)
+ participants.append((user.nick, aff[user.affiliation]()))
elif user.role == 'moderator':
- moderators.append(user.nick)
+ moderators.append((user.nick, aff[user.affiliation]()))
else:
- others.append(user.nick)
+ others.append((user.nick, aff[user.affiliation]()))
message = 'Users: %s \n' % len(self.users)
for moderator in moderators:
- message += ' \x19%s}%s\x19o -' % (color_moderator, moderator)
+ message += ' [%s] \x19%s}%s\x19o -' % (moderator[1],
+ color_moderator, moderator[0])
for participant in participants:
- message += ' \x19%s}%s\x19o -' % (color_participant, participant)
+ message += ' [%s] \x19%s}%s\x19o -' % (participant[1],
+ color_participant, participant[0])
for visitor in visitors:
- message += ' \x19%s}%s\x19o -' % (color_visitor, visitor)
+ message += ' [%s] \x19%s}%s\x19o -' % (visitor[1],
+ color_visitor, visitor[0])
for other in others:
- message += ' \x19%s}%s\x19o -' % (color_other, other)
+ message += ' [%s] \x19%s}%s\x19o -' % (other[1],
+ color_other, other[0])
message = message[:-2]
self._text_buffer.add_message(message)