# HG changeset patch # User Eric Warmenhoven # Date 1006208740 0 # Node ID 450f4f9d2f2323c328b5fd7f7b0334200fffdd45 # Parent 24ebd5e321e4a96ed203566dd911acb57697498f [gaim-migrate @ 2784] maybe this is better? committer: Tailor Script diff -r 24ebd5e321e4 -r 450f4f9d2f23 src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Mon Nov 19 19:43:07 2001 +0000 +++ b/src/protocols/yahoo/yahoo.c Mon Nov 19 22:25:40 2001 +0000 @@ -398,6 +398,34 @@ buddy->msg = msg ? g_strdup(msg) : NULL; yd->login = g_slist_append(yd->login, buddy); break; + case 60: /* uh */ + while (yd->login) { + buddy = yd->login->data; + state = buddy->state; + yd->login = g_slist_remove(yd->login, buddy); + if (state == YAHOO_STATUS_AVAILABLE) + serv_got_update(gc, buddy->name, 1, 0, 0, 0, 0, 0); + else if (state == YAHOO_STATUS_IDLE) + serv_got_update(gc, buddy->name, 1, 0, 0, time(NULL) - 600, + (state << 1), 0); + else + serv_got_update(gc, buddy->name, 1, 0, 0, 0, + (state << 1) | UC_UNAVAILABLE, 0); + if (state == YAHOO_STATUS_CUSTOM) { + gpointer val = g_hash_table_lookup(yd->hash, buddy->name); + if (val) { + g_free(val); + g_hash_table_insert(yd->hash, buddy->name, + g_strdup(buddy->msg)); + } else + g_hash_table_insert(yd->hash, g_strdup(buddy->name), + g_strdup(buddy->msg)); + } + g_free(buddy->msg); + g_free(buddy->name); + g_free(buddy); + } + break; default: debug_printf("unknown login key %d\n", pair->key); break; @@ -641,6 +669,7 @@ case YAHOO_SERVICE_LOGON: yahoo_process_logon(gc, pkt); break; + case YAHOO_SERVICE_LOGOFF: case YAHOO_SERVICE_ISAWAY: case YAHOO_SERVICE_ISBACK: yahoo_process_status(gc, pkt);