# HG changeset patch # User Sean Egan # Date 1039677185 0 # Node ID 1590dfa0ecba58858f428980d2b02bd9c25e55c0 # Parent b188b93ebf4802fff5436d7a48948c08ed556067 [gaim-migrate @ 4275] (01:38:36) LSchiere: go fix some bug. give me something to be optimistic about (01:55:20) LSchiere: oh. i have a better bug for you to fix. fix the /kick bug (01:55:33) LSchiere: so that when you /kick someone in #gaim they don't appear to have been kicked in [other channels] I think this will fix that--it might just make things worse. Yay, beer! committer: Tailor Script diff -r b188b93ebf48 -r 1590dfa0ecba src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Thu Dec 12 04:03:53 2002 +0000 +++ b/src/protocols/irc/irc.c Thu Dec 12 07:13:05 2002 +0000 @@ -1125,29 +1125,23 @@ } static void -irc_rem_chat_bud(struct gaim_connection *gc, char *nick, char *reason) +irc_rem_chat_bud(struct gaim_connection *gc, char *nick, struct conversation *b, char *reason) { - GSList *bcs = gc->buddy_chats; - - while (bcs) { - struct conversation *b = bcs->data; - 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; - } + 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; - } - bcs = bcs->next; } } @@ -1395,7 +1389,8 @@ } else { char *reason = *word_eol[5] == ':' ? word_eol[5] + 1 : word_eol[5]; char *msg = g_strdup_printf(_("Kicked by %s: %s"), nick, reason); - irc_rem_chat_bud(gc, word[4], msg); + struct conversation *c = irc_find_chat(gc, word[3]); + irc_rem_chat_bud(gc, word[4], c, msg); g_free(msg); } } else if (!strcmp(cmd, "KILL")) { /* */ @@ -1426,7 +1421,7 @@ } } else if (!strcmp(cmd, "PONG")) { /* */ } else if (!strcmp(cmd, "QUIT")) { - irc_rem_chat_bud(gc, nick, *word_eol[3] == ':' ? word_eol[3] + 1 : word_eol[3]); + irc_rem_chat_bud(gc, nick, irc_find_chat(gc, word[3]), *word_eol[3] == ':' ? word_eol[3] + 1 : word_eol[3]); } else if (!strcmp(cmd, "TOPIC")) { irc_parse_topic(gc, nick, word, word_eol); } else if (!strcmp(cmd, "WALLOPS")) { /* Don't know if a dialog box is the right way? */