From 94436e075b680617340884fb3dd870bcef6826e5 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 11 Aug 2011 23:31:03 +0200 Subject: Fix a tb on invalid show in presence from a muc (Displays a warning in that case, so that we can laugh about it.) --- src/tabs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tabs.py b/src/tabs.py index 8f715349..e04f330e 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -931,6 +931,9 @@ class MucTab(ChatTab): display_message = False # flag to know if something significant enough # to be displayed has changed msg = _('\x193%s\x195 changed: ')% from_nick.replace('"', '\\"') + if show not in SHOW_NAME: + self.core.information("%s from room %s sent an invalid show: %s" %\ + (from_nick, from_room, show), "warning") if affiliation != user.affiliation: msg += _('affiliation: %s, ') % affiliation display_message = True @@ -942,7 +945,7 @@ class MucTab(ChatTab): display_message = True if status != user.status: # if the user sets his status to nothing - if not status: + if not status and show in SHOW_NAME: msg += _('show: %s, ') % SHOW_NAME[show] else: msg += _('status: %s, ') % status -- cgit v1.2.3