Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 2713:34ddcb44a4d2
[gaim-migrate @ 2726]
eh
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Tue, 13 Nov 2001 06:48:34 +0000 |
parents | e841b14b5b89 |
children | 03bf072c6238 |
comparison
equal
deleted
inserted
replaced
2712:d17c504adc36 | 2713:34ddcb44a4d2 |
---|---|
1085 time_t time_idle; | 1085 time_t time_idle; |
1086 int type = 0; | 1086 int type = 0; |
1087 struct gaim_connection *gc = sess->aux_data; | 1087 struct gaim_connection *gc = sess->aux_data; |
1088 struct oscar_data *od = gc->proto_data; | 1088 struct oscar_data *od = gc->proto_data; |
1089 char *tmp; | 1089 char *tmp; |
1090 int caps; | |
1090 | 1091 |
1091 va_list ap; | 1092 va_list ap; |
1092 va_start(ap, fr); | 1093 va_start(ap, fr); |
1093 info = va_arg(ap, aim_userinfo_t *); | 1094 info = va_arg(ap, aim_userinfo_t *); |
1094 va_end(ap); | 1095 va_end(ap); |
1096 | |
1097 caps = info->capabilities; | |
1095 | 1098 |
1096 if (!od->icq) { | 1099 if (!od->icq) { |
1097 if (info->flags & AIM_FLAG_ACTIVEBUDDY) | 1100 if (info->flags & AIM_FLAG_ACTIVEBUDDY) |
1098 type |= UC_AB; | 1101 type |= UC_AB; |
1099 if (info->flags & AIM_FLAG_UNCONFIRMED) | 1102 if (info->flags & AIM_FLAG_UNCONFIRMED) |
1110 if (info->icqinfo.status) { | 1113 if (info->icqinfo.status) { |
1111 type = (info->icqinfo.status << 6); | 1114 type = (info->icqinfo.status << 6); |
1112 if (!(info->icqinfo.status & AIM_ICQ_STATE_CHAT)) | 1115 if (!(info->icqinfo.status & AIM_ICQ_STATE_CHAT)) |
1113 type |= UC_UNAVAILABLE; | 1116 type |= UC_UNAVAILABLE; |
1114 } | 1117 } |
1118 if (caps & AIM_CAPS_EVERYBUDDY) | |
1119 caps ^= AIM_CAPS_EVERYBUDDY; | |
1115 debug_printf("icq status: %d\n", info->icqinfo.status); | 1120 debug_printf("icq status: %d\n", info->icqinfo.status); |
1116 } | 1121 } |
1117 | 1122 |
1118 if (info->idletime) { | 1123 if (info->idletime) { |
1119 time(&time_idle); | 1124 time(&time_idle); |
1125 if (!strcmp(tmp, normalize(info->sn))) | 1130 if (!strcmp(tmp, normalize(info->sn))) |
1126 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", info->sn); | 1131 g_snprintf(gc->displayname, sizeof(gc->displayname), "%s", info->sn); |
1127 g_free(tmp); | 1132 g_free(tmp); |
1128 | 1133 |
1129 serv_got_update(gc, info->sn, 1, info->warnlevel/10, time(NULL) - info->sessionlen, | 1134 serv_got_update(gc, info->sn, 1, info->warnlevel/10, time(NULL) - info->sessionlen, |
1130 time_idle, type, info->capabilities); | 1135 time_idle, type, caps); |
1131 | 1136 |
1132 return 1; | 1137 return 1; |
1133 } | 1138 } |
1134 | 1139 |
1135 static int gaim_parse_offgoing(aim_session_t *sess, aim_frame_t *fr, ...) { | 1140 static int gaim_parse_offgoing(aim_session_t *sess, aim_frame_t *fr, ...) { |