Mercurial > xib
changeset 145:ddc87b605019
minor fix in Participant.changeNickname()
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 17 Jan 2010 17:42:36 +0100 |
parents | fcab2bdf1d65 |
children | 229a59acde0f |
files | participant.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/participant.py +++ b/participant.py @@ -182,6 +182,7 @@ class Participant: def changeNickname(self, newnick, on_protocol): """Change participant's nickname.""" + p = None oldnick = self.nickname if self.protocol == 'xmpp': @@ -242,6 +243,10 @@ class Participant: self.nickname = newnick self.duplicate_nickname = newnick + + if not isinstance(p, Participant): + return + if p.nickname == newnick: if p.protocol == self.protocol: # should never happen