comparison src/protocols/yahoo/yahoo.c @ 6069:5ca86172352a

[gaim-migrate @ 6519] Tim Ringenbach (marv_sf) writes: "This fixes offline messages in yahoo. Now you should get all of them." normally i run yahoo patches by sean. but i know he won't look at it. and i am sick of yahoo offline messages being buggy as all get out. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 09 Jul 2003 04:25:12 +0000
parents c28dea25983c
children 11bedb793a44
comparison
equal deleted inserted replaced
6068:ba3847f74387 6069:5ca86172352a
551 { 551 {
552 char *msg = NULL; 552 char *msg = NULL;
553 char *from = NULL; 553 char *from = NULL;
554 time_t tm = time(NULL); 554 time_t tm = time(NULL);
555 GSList *l = pkt->hash; 555 GSList *l = pkt->hash;
556
557 while (l) {
558 struct yahoo_pair *pair = l->data;
559 if (pair->key == 4)
560 from = pair->value;
561 if (pair->key == 14)
562 msg = pair->value;
563 if (pair->key == 15)
564 tm = strtol(pair->value, NULL, 10);
565 l = l->next;
566 }
567 556
568 if (pkt->status <= 1 || pkt->status == 5) { 557 if (pkt->status <= 1 || pkt->status == 5) {
569 char *m; 558 while (l) {
570 int i, j; 559 struct yahoo_pair *pair = l->data;
571 strip_linefeed(msg); 560 if (pair->key == 4)
572 m = msg; 561 from = pair->value;
573 for (i = 0, j = 0; m[i]; i++) { 562 if (pair->key == 15)
574 if (m[i] == 033) { 563 tm = strtol(pair->value, NULL, 10);
575 while (m[i] && (m[i] != 'm')) 564 if (pair->key == 14) {
576 i++; 565 char *m;
577 if (!m[i]) 566 int i, j;
578 i--; 567
579 continue; 568 msg = pair->value;
569
570 strip_linefeed(msg);
571 m = msg;
572 for (i = 0, j = 0; m[i]; i++) {
573 if (m[i] == 033) {
574 while (m[i] && (m[i] != 'm'))
575 i++;
576 if (!m[i])
577 i--;
578 continue;
579 }
580 msg[j++] = m[i];
581 }
582 msg[j] = 0;
583 serv_got_im(gc, from, msg, 0, tm, -1);
584
585 tm = time(NULL);
580 } 586 }
581 msg[j++] = m[i]; 587 l = l->next;
582 } 588 }
583 msg[j] = 0;
584 serv_got_im(gc, from, msg, 0, tm, -1);
585 } else if (pkt->status == 2) { 589 } else if (pkt->status == 2) {
586 gaim_notify_error(gc, NULL, 590 gaim_notify_error(gc, NULL,
587 _("Your Yahoo! message did not get sent."), NULL); 591 _("Your Yahoo! message did not get sent."), NULL);
588 } 592 }
589 } 593 }