diff browser_side/panels.py @ 408:ee8ebfe23e16

browser_side: handle the signal "roomUserChangedNick"
author souliane <souliane@mailoo.org>
date Mon, 17 Mar 2014 16:33:05 +0100
parents 6a6551de4414
children ae598511850d
line wrap: on
line diff
--- a/browser_side/panels.py	Sun Mar 16 21:03:50 2014 +0100
+++ b/browser_side/panels.py	Mon Mar 17 16:33:05 2014 +0100
@@ -1159,6 +1159,12 @@
         self.occupants_list.removeOccupant(nick)
         self.printInfo("<= %s has left the room" % nick)
 
+    def changeUserNick(self, old_nick, new_nick):
+        assert(self.type == "group")
+        self.occupants_list.removeOccupant(old_nick)
+        self.occupants_list.addOccupant(new_nick)
+        self.printInfo(_("%(old_nick)s is now known as %(new_nick)s") % {'old_nick': old_nick, 'new_nick': new_nick})
+
     def historyPrint(self, size=20):
         """Print the initial history"""
         def getHistoryCB(history):