src/protocols/yahoo/yahoo.c

changeset 10553
89697092b958
parent 10504
eae130eefbfe
child 10575
f360d2dc8a1c
equal deleted inserted replaced
10552:166ea20eeb69 10553:89697092b958
172 } 172 }
173 break; 173 break;
174 case 8: /* how many online buddies we have */ 174 case 8: /* how many online buddies we have */
175 break; 175 break;
176 case 7: /* the current buddy */ 176 case 7: /* the current buddy */
177 if (name && f) /* update the previous buddy before changing the variables */
178 yahoo_update_status(gc, name, f);
177 name = pair->value; 179 name = pair->value;
178 if (name && g_utf8_validate(name, -1, NULL)) 180 if (name && g_utf8_validate(name, -1, NULL))
179 f = yahoo_friend_find_or_new(gc, name); 181 f = yahoo_friend_find_or_new(gc, name);
180 else { 182 else {
181 f = NULL; 183 f = NULL;
249 if (f) 251 if (f)
250 f->status = YAHOO_STATUS_OFFLINE; 252 f->status = YAHOO_STATUS_OFFLINE;
251 gaim_prpl_got_user_status(account, name, "offline", NULL); 253 gaim_prpl_got_user_status(account, name, "offline", NULL);
252 break; 254 break;
253 } 255 }
254
255 if (f)
256 yahoo_update_status(gc, name, f);
257 break; 256 break;
258 case 60: /* SMS */ 257 case 60: /* SMS */
259 if (f) { 258 if (f) {
260 f->sms = strtol(pair->value, NULL, 10); 259 f->sms = strtol(pair->value, NULL, 10);
261 yahoo_update_status(gc, name, f); 260 yahoo_update_status(gc, name, f);
318 break; 317 break;
319 } 318 }
320 319
321 l = l->next; 320 l = l->next;
322 } 321 }
322
323 if (name && f) /* update the last buddy */
324 yahoo_update_status(gc, name, f);
323 } 325 }
324 326
325 static void yahoo_do_group_check(GaimAccount *account, GHashTable *ht, const char *name, const char *group) 327 static void yahoo_do_group_check(GaimAccount *account, GHashTable *ht, const char *name, const char *group)
326 { 328 {
327 GaimBuddy *b; 329 GaimBuddy *b;

mercurial