Mercurial > pidgin.yaz
diff src/protocols/irc/msgs.c @ 6407:ba0b99a72be2
[gaim-migrate @ 6913]
Added API commands for adding or removing a batch of users at once to/from
a chat. IRC no longer has half a billion "Diablo-D3 has entered the room."
messages anymore.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 07 Aug 2003 20:47:29 +0000 |
parents | 1fa4410d2e13 |
children | 42fdf16f1dad |
line wrap: on
line diff
--- a/src/protocols/irc/msgs.c Thu Aug 07 01:15:54 2003 +0000 +++ b/src/protocols/irc/msgs.c Thu Aug 07 20:47:29 2003 +0000 @@ -294,6 +294,8 @@ g_free(irc->nameconv); irc->nameconv = NULL; } else { + GList *users = NULL; + while (*cur) { end = strchr(cur, ' '); if (!end) @@ -301,12 +303,22 @@ if (*cur == '@' || *cur == '%' || *cur == '+') cur++; tmp = g_strndup(cur, end - cur); - gaim_chat_add_user(GAIM_CHAT(convo), tmp, NULL); - g_free(tmp); + users = g_list_append(users, tmp); cur = end; if (*cur) cur++; } + + if (users != NULL) { + GList *l; + + gaim_chat_add_users(GAIM_CHAT(convo), users); + + for (l = users; l != NULL; l = l->next) + g_free(l->data); + + g_list_free(users); + } } g_free(names); } else {