Mercurial > xib
comparison bot.py @ 99:5390e9abfa44
Don't try to remove a participant that does not exist
Signed-off-by: Charly COSTE <changaco@changaco.net>
author | Charly COSTE <changaco@changaco.net> |
---|---|
date | Sun, 04 Oct 2009 14:00:31 +0200 |
parents | dd7e1b935894 |
children | 6289ac5a2db7 |
comparison
equal
deleted
inserted
replaced
98:35e0ddf3b13c | 99:5390e9abfa44 |
---|---|
223 | 223 |
224 bridge.removeParticipant('xmpp', p.nickname, s1+s2) | 224 bridge.removeParticipant('xmpp', p.nickname, s1+s2) |
225 | 225 |
226 else: | 226 else: |
227 # participant left | 227 # participant left |
228 bridge.removeParticipant('xmpp', resource, presence.getStatus()) | 228 if p != None: |
229 bridge.removeParticipant('xmpp', resource, presence.getStatus()) | |
229 | 230 |
230 elif resource != bridge.bot.nickname: | 231 elif resource != bridge.bot.nickname: |
231 bridge.addParticipant('xmpp', resource) | 232 bridge.addParticipant('xmpp', resource) |
232 return | 233 return |
233 | 234 |