# HG changeset patch # User Nathan Walp # Date 1064160890 0 # Node ID 5ace3b44cf61239f1181e4f84fac20b953564649 # Parent 62cafee713733e1f25dff51231c47da0dceafbff [gaim-migrate @ 7448] fix the incorrect group online counts committer: Tailor Script diff -r 62cafee71373 -r 5ace3b44cf61 src/blist.c --- a/src/blist.c Sun Sep 21 01:40:16 2003 +0000 +++ b/src/blist.c Sun Sep 21 16:14:50 2003 +0000 @@ -258,12 +258,16 @@ gboolean do_timer = FALSE; if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { + int old_present = buddy->present; buddy->present = GAIM_BUDDY_SIGNING_ON; gaim_signal_emit(gaim_blist_get_handle(), "buddy-signed-on", buddy); do_timer = TRUE; - ((GaimContact*)((GaimBlistNode*)buddy)->parent)->online++; - if(((GaimContact*)((GaimBlistNode*)buddy)->parent)->online == 1) - ((GaimGroup *)((GaimBlistNode *)buddy)->parent->parent)->online++; + + if(old_present != GAIM_BUDDY_SIGNING_OFF) { + ((GaimContact*)((GaimBlistNode*)buddy)->parent)->online++; + if(((GaimContact*)((GaimBlistNode*)buddy)->parent)->online == 1) + ((GaimGroup *)((GaimBlistNode *)buddy)->parent->parent)->online++; + } } else if(GAIM_BUDDY_IS_ONLINE(buddy) && !presence) { buddy->present = GAIM_BUDDY_SIGNING_OFF; gaim_signal_emit(gaim_blist_get_handle(), "buddy-signed-off", buddy); @@ -1354,9 +1358,9 @@ ops->update(gaimbuddylist, cnode); } else if(GAIM_BLIST_NODE_IS_CHAT(cnode) && ((GaimBlistChat*)cnode)->account == account) { - ((GaimGroup *)gnode)->online++; - ((GaimGroup *)gnode)->currentsize++; - ops->update(gaimbuddylist, cnode); + ((GaimGroup *)gnode)->online++; + ((GaimGroup *)gnode)->currentsize++; + ops->update(gaimbuddylist, cnode); } } ops->update(gaimbuddylist, gnode);