Mercurial > pidgin
diff src/protocols/irc/irc.c @ 4349:0c68d402f59f
[gaim-migrate @ 4614]
XML Blist
Gaim stores all the buddy lists in one big happy file now. You can order
the buddies however you want, and they'll stay ordered that way.
We can also store some per-buddy information now, which will be cool.
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Sun, 19 Jan 2003 22:16:52 +0000 |
| parents | 9c7fcb211886 |
| children | 5fb47ec9bfe4 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Sun Jan 19 22:03:57 2003 +0000 +++ b/src/protocols/irc/irc.c Sun Jan 19 22:16:52 2003 +0000 @@ -610,23 +610,25 @@ return; g_strdown(id->str->str); - gr = gc->groups; + gr = groups; while (gr) { GSList *m = ((struct group *)gr->data)->members; while (m) { struct buddy *b = m->data; - char *tmp = g_strdup(b->name); - char *x, *l; - g_strdown(tmp); - x = strstr(id->str->str, tmp); - l = x + strlen(b->name); - if (x && (*l != ' ' && *l != 0)) - x = 0; - if (!b->present && x) - serv_got_update(gc, b->name, 1, 0, 0, 0, 0, 0); - else if (b->present && !x) - serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0); - g_free(tmp); + if(b->user->gc == gc) { + char *tmp = g_strdup(b->name); + char *x, *l; + g_strdown(tmp); + x = strstr(id->str->str, tmp); + l = x + strlen(b->name); + if (x && (*l != ' ' && *l != 0)) + x = 0; + if (!b->present && x) + serv_got_update(gc, b->name, 1, 0, 0, 0, 0, 0); + else if (b->present && !x) + serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0); + g_free(tmp); + } m = m->next; } gr = gr->next; @@ -643,7 +645,7 @@ char buf[500]; int n = g_snprintf(buf, sizeof(buf), "ISON"); - GSList *gr = gc->groups; + GSList *gr = groups; if (!gr || id->bc) return TRUE; @@ -652,13 +654,15 @@ GSList *m = g->members; while (m) { struct buddy *b = m->data; - if (n + strlen(b->name) + 2 > sizeof(buf)) { - g_snprintf(buf + n, sizeof(buf) - n, "\r\n"); - irc_write(id->fd, buf, n); - id->bc++; - n = g_snprintf(buf, sizeof(buf), "ISON"); + if(b->user->gc == gc) { + if (n + strlen(b->name) + 2 > sizeof(buf)) { + g_snprintf(buf + n, sizeof(buf) - n, "\r\n"); + irc_write(id->fd, buf, n); + id->bc++; + n = g_snprintf(buf, sizeof(buf), "ISON"); + } + n += g_snprintf(buf + n, sizeof(buf) - n, " %s", b->name); } - n += g_snprintf(buf + n, sizeof(buf) - n, " %s", b->name); m = m->next; } gr = gr->next; @@ -1321,9 +1325,6 @@ account_online(gc); serv_finish_login(gc); - if (bud_list_cache_exists(gc)) - do_import(gc, NULL); - /* we don't call this now because otherwise some IRC servers might not like us */ idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc); idata->online = TRUE;
