Mercurial > pidgin
comparison src/protocols/toc/toc.c @ 9927:fb08a0973b3e
[gaim-migrate @ 10819]
" Currently, the "loggedin" parameter of
serv_got_update() is of type int and used as a boolean.
I updated it and all references to be gboolean.
I also noticed that "presence" in
gaim_blist_update_buddy_presence() is also a really
boolean. of whether or not the buddy is currently
online. There seemed to be some confusion,
particularly in the silc plugin which tried to use a
GaimBuddyPresenceState (coincidentally (or perhaps not)
GAIM_BUDDY_OFFLINE and GAIM_BUDDY_ONLINE work as FALSE
and TRUE respectively). The value passed to
gaim_blist_update_buddy_presence() doesn't directly
become the buddy presence state and this patch helps
avoid confusion in this respect." --Daniel Atallah
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Wed, 01 Sep 2004 01:07:42 +0000 |
| parents | e74eb0d11f86 |
| children | b13013595c08 |
comparison
equal
deleted
inserted
replaced
| 9926:b23e70bd1215 | 9927:fb08a0973b3e |
|---|---|
| 717 a = (away && (*away == 'T')) ? GAIM_CONV_IM_AUTO_RESP : 0; | 717 a = (away && (*away == 'T')) ? GAIM_CONV_IM_AUTO_RESP : 0; |
| 718 | 718 |
| 719 serv_got_im(gc, c, message, a, time(NULL)); | 719 serv_got_im(gc, c, message, a, time(NULL)); |
| 720 } else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) { | 720 } else if (!g_ascii_strcasecmp(c, "UPDATE_BUDDY")) { |
| 721 char *l, *uc, *tmp; | 721 char *l, *uc, *tmp; |
| 722 int logged, evil, idle, type = 0; | 722 gboolean logged_in; |
| 723 int evil, idle, type = 0; | |
| 723 time_t signon, time_idle; | 724 time_t signon, time_idle; |
| 724 | 725 |
| 725 c = strtok(NULL, ":"); /* name */ | 726 c = strtok(NULL, ":"); /* name */ |
| 726 l = strtok(NULL, ":"); /* online */ | 727 l = strtok(NULL, ":"); /* online */ |
| 727 sscanf(strtok(NULL, ":"), "%d", &evil); | 728 sscanf(strtok(NULL, ":"), "%d", &evil); |
| 728 sscanf(strtok(NULL, ":"), "%ld", &signon); | 729 sscanf(strtok(NULL, ":"), "%ld", &signon); |
| 729 sscanf(strtok(NULL, ":"), "%d", &idle); | 730 sscanf(strtok(NULL, ":"), "%d", &idle); |
| 730 uc = strtok(NULL, ":"); | 731 uc = strtok(NULL, ":"); |
| 731 | 732 |
| 732 logged = (l && (*l == 'T')) ? 1 : 0; | 733 logged_in = (l && (*l == 'T')) ? TRUE : FALSE; |
| 733 | 734 |
| 734 if (uc[0] == 'A') | 735 if (uc[0] == 'A') |
| 735 type |= UC_AOL; | 736 type |= UC_AOL; |
| 736 switch (uc[1]) { | 737 switch (uc[1]) { |
| 737 case 'A': | 738 case 'A': |
| 768 gc->evil = evil; | 769 gc->evil = evil; |
| 769 gc->login_time_official = signon; | 770 gc->login_time_official = signon; |
| 770 } | 771 } |
| 771 g_free(tmp); | 772 g_free(tmp); |
| 772 | 773 |
| 773 serv_got_update(gc, c, logged, evil, signon, time_idle, type); | 774 serv_got_update(gc, c, logged_in, evil, signon, time_idle, type); |
| 774 } else if (!g_ascii_strcasecmp(c, "ERROR")) { | 775 } else if (!g_ascii_strcasecmp(c, "ERROR")) { |
| 775 gaim_notify_error(gc, NULL, show_error_message(), NULL); | 776 gaim_notify_error(gc, NULL, show_error_message(), NULL); |
| 776 } else if (!g_ascii_strcasecmp(c, "EVILED")) { | 777 } else if (!g_ascii_strcasecmp(c, "EVILED")) { |
| 777 int lev; | 778 int lev; |
| 778 char *name; | 779 char *name; |
