comparison src/protocols/yahoo/yahoo.c @ 5521:76ec14ba51d7

[gaim-migrate @ 5921] Yahoo uses the new mail notification. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 26 May 2003 01:46:58 +0000
parents cce2d7868c78
children e46efd264489
comparison
equal deleted inserted replaced
5520:11be8ae32937 5521:76ec14ba51d7
664 char *email = NULL; 664 char *email = NULL;
665 char *subj = NULL; 665 char *subj = NULL;
666 int count = 0; 666 int count = 0;
667 GSList *l = pkt->hash; 667 GSList *l = pkt->hash;
668 668
669 if (!GAIM_ACCOUNT_CHECK_MAIL(gc->account))
670 return;
671
669 while (l) { 672 while (l) {
670 struct yahoo_pair *pair = l->data; 673 struct yahoo_pair *pair = l->data;
671 if (pair->key == 9) 674 if (pair->key == 9)
672 count = strtol(pair->value, NULL, 10); 675 count = strtol(pair->value, NULL, 10);
673 else if (pair->key == 43) 676 else if (pair->key == 43)
679 l = l->next; 682 l = l->next;
680 } 683 }
681 684
682 if (who && subj && email && *email) { 685 if (who && subj && email && *email) {
683 char *from = g_strdup_printf("%s (%s)", who, email); 686 char *from = g_strdup_printf("%s (%s)", who, email);
684 connection_has_mail(gc, -1, from, subj, "http://mail.yahoo.com/"); 687
688 gaim_notify_email(gc, subj, from, gc->username,
689 "http://mail.yahoo.com/", NULL, NULL);
690
685 g_free(from); 691 g_free(from);
686 } else if (count > 0) 692 } else if (count > 0) {
687 connection_has_mail(gc, count, NULL, NULL, "http://mail.yahoo.com/"); 693 const char *to = gc->username;
694 const char *url = "http://mail.yahoo.com/";
695
696 gaim_notify_emails(gc, count, FALSE, NULL, NULL, &to, &url,
697 NULL, NULL);
698 }
688 } 699 }
689 /* This is the y64 alphabet... it's like base64, but has a . and a _ */ 700 /* This is the y64 alphabet... it's like base64, but has a . and a _ */
690 char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; 701 char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._";
691 702
692 /* This is taken from Sylpheed by Hiroyuki Yamamoto. We have our own tobase64 function 703 /* This is taken from Sylpheed by Hiroyuki Yamamoto. We have our own tobase64 function