From 3ae39c8027cdfe8bead53485a56f1c9b457d82eb Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Thu, 8 Jul 2010 20:05:06 +0000 Subject: fixed #1499 Also fix the '/join /sdf' bug that didn't update the new own_nick of the room --- src/gui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui.py') diff --git a/src/gui.py b/src/gui.py index abbe1329..6c698df3 100644 --- a/src/gui.py +++ b/src/gui.py @@ -434,11 +434,11 @@ class Gui(object): elif kick: room.users.remove(user) try: - reason = stanza.getReason().encode('utf-8') + reason = stanza.getReason() except: reason = '' try: - by = stanza.getActor().encode('utf-8') + by = stanza.getActor() except: by = None if from_nick == room.own_nick: # we are kicked @@ -446,7 +446,7 @@ class Gui(object): if by: self.add_message_to_room(room, _("You have been kicked by %(by)s. Reason: %(reason)s") % {'by':by, 'reason':reason}) else: - self.add_message_to_room(room, _("You have been kicked. Reason: %s") % (reason.encode('utf-8'))) + self.add_message_to_room(room, _("You have been kicked. Reason: %s") % (reason)) else: if by: self.add_message_to_room(room, _("%(nick)s has been kicked by %(by)s. Reason: %(reason)s") % {'nick':from_nick, 'by':by, 'reason':reason}) @@ -640,6 +640,7 @@ class Gui(object): if not r: # if the room window exists, we don't recreate it. self.join_room(room, nick) else: + r.own_nick = nick # r.own_nick = nick r.users = [] -- cgit v1.2.3