From 94bab4e9ef692cbc81d848e9a97c2b1b1ed89359 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 3 Jun 2004 19:47:45 +0000 Subject: [PATCH] if a user log on with a resource then log off and log on with another resources, we must remove old user, what is done now --- plugins/gtkgui/gtkgui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index d4b4db258..1c9517703 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -523,7 +523,6 @@ class roster_Window: if (show == 'offline' or show == 'error') and not showOffline: if len(self.contacts[account][user.jid]) > 1: luser = self.contacts[account][user.jid] - user1 = None for u in luser: if u.resource == user.resource: luser.remove(u) @@ -1264,7 +1263,8 @@ class plugin: break if not user1: user1 = self.roster.contacts[ev[1]][ji][0] - if resources != ['']: + if resources != [''] and (len(luser) != 1 or + luser[0].show != 'offline'): user1 = user(user1.jid, user1.name, user1.groups, \ user1.show, user1.status, user1.sub, user1.resource) luser.append(user1)