Mercurial > libervia-backend
diff frontends/wix/chat.py @ 75:7322a41f8a8e
Basic user joined/left management
- plugin XEP-0045: user joined./left signal is sended
- wix: user are adder/removed when these signals are catched
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 Mar 2010 16:54:53 +1100 |
parents | f271fff3a713 |
children | 8becde8a967c |
line wrap: on
line diff
--- a/frontends/wix/chat.py Wed Mar 24 16:50:53 2010 +1100 +++ b/frontends/wix/chat.py Mon Mar 29 16:54:53 2010 +1100 @@ -97,6 +97,25 @@ return for nick in nicks: self.present_panel.presents.replace(nick) + + + def replaceUser(self, nick): + """Add user if it is not in the group list""" + debug (_("Replacing user %s") % nick) + if self.type != "group": + error (_("[INTERNAL] trying to replace user for a non group chat window")) + return + self.present_panel.presents.replace(nick) + + def removeUser(self, nick): + """Remove a user from the group list""" + debug(_("Removing user %s") % nick) + if self.type != "group": + error (_("[INTERNAL] trying to remove user for a non group chat window")) + return + self.present_panel.presents.remove(nick) + + def createMenus(self): info("Creating menus")