Mercurial > pidgin.yaz
changeset 4067:bb4aabb9ba53
[gaim-migrate @ 4279]
It made things worse :(
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 12 Dec 2002 17:56:09 +0000 |
parents | fd764830519c |
children | 29401c9ccc2a |
files | src/protocols/irc/irc.c |
diffstat | 1 files changed, 22 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Thu Dec 12 16:51:13 2002 +0000 +++ b/src/protocols/irc/irc.c Thu Dec 12 17:56:09 2002 +0000 @@ -1128,20 +1128,29 @@ irc_rem_chat_bud(struct gaim_connection *gc, char *nick, struct conversation *b, char *reason) { - GList *r = b->in_room; - while (r) { - char *who = r->data; - if (*who == '@') - who++; - if (*who == '+') - who++; - if (!g_strcasecmp(who, nick)) { - char *tmp = g_strdup(r->data); - remove_chat_buddy(b, tmp, reason); - g_free(tmp); - break; + if (b) { + GList *r = b->in_room; + while (r) { + char *who = r->data; + if (*who == '@') + who++; + if (*who == '+') + who++; + if (!g_strcasecmp(who, nick)) { + char *tmp = g_strdup(r->data); + remove_chat_buddy(b, tmp, reason); + g_free(tmp); + break; + } + r = r->next; } - r = r->next; + } else { + GSList *bcs = gc->buddy_chats; + while (bcs) { + struct conversation *bc = bcs->data; + irc_rem_chat_bud(gc, nick, bc, reason); + bcs = bcs->next; + } } }