comparison src/protocols/oscar/oscar.c @ 2273:0b5c3338fa3d

[gaim-migrate @ 2283] One of the girls on the floor of my sister's dorm lost both her parents when their plane was hijacked and crashed into the World Trade Center. my girlfriend's boss's sister-in-law's brother died when the building collapsed. my parents flew to atlanta on monday; they're safe but currently stranded there. they had planned on flying to Raleigh, NC today but now are just hoping to be able to fly home soon. how did this happen? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 12 Sep 2001 21:29:32 +0000
parents 59a11f4fa4d0
children 4f2a6268c5ec
comparison
equal deleted inserted replaced
2272:4ecc9a9a75d8 2273:0b5c3338fa3d
56 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" 56 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3"
57 57
58 static int gaim_caps = AIM_CAPS_CHAT | 58 static int gaim_caps = AIM_CAPS_CHAT |
59 AIM_CAPS_BUDDYICON | 59 AIM_CAPS_BUDDYICON |
60 AIM_CAPS_IMIMAGE; 60 AIM_CAPS_IMIMAGE;
61 static fu8_t gaim_features[] = {0x01, 0x01, 0x01, 0x02, 0x66};
61 62
62 struct oscar_data { 63 struct oscar_data {
63 aim_session_t *sess; 64 aim_session_t *sess;
64 aim_conn_t *conn; 65 aim_conn_t *conn;
65 66
1257 } 1258 }
1258 1259
1259 static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, struct aim_userinfo_s *userinfo, struct aim_incomingim_ch1_args *args) { 1260 static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, struct aim_userinfo_s *userinfo, struct aim_incomingim_ch1_args *args) {
1260 char *tmp = g_malloc(BUF_LONG); 1261 char *tmp = g_malloc(BUF_LONG);
1261 struct gaim_connection *gc = sess->aux_data; 1262 struct gaim_connection *gc = sess->aux_data;
1263 int flags = 0;
1264
1265 if (sizeof(gaim_features) == args->featureslen) {
1266 int i;
1267 for (i = 0; i < args->featureslen; i++) {
1268 if (gaim_features[i] != args->features[i])
1269 break;
1270 }
1271 if (i == args->featureslen)
1272 flags |= IM_FLAG_GAIMUSER;
1273 }
1274
1275 if (args->icbmflags & AIM_IMFLAGS_AWAY)
1276 flags |= IM_FLAG_AWAY;
1262 1277
1263 if (args->icbmflags & AIM_IMFLAGS_HASICON) { 1278 if (args->icbmflags & AIM_IMFLAGS_HASICON) {
1264 struct oscar_data *od = gc->proto_data; 1279 struct oscar_data *od = gc->proto_data;
1265 struct icon_req *ir = NULL; 1280 struct icon_req *ir = NULL;
1266 GSList *h = od->hasicons; 1281 GSList *h = od->hasicons;
1325 } 1340 }
1326 } 1341 }
1327 } else 1342 } else
1328 g_snprintf(tmp, BUF_LONG, "%s", args->msg); 1343 g_snprintf(tmp, BUF_LONG, "%s", args->msg);
1329 1344
1330 serv_got_im(gc, userinfo->sn, tmp, args->icbmflags & AIM_IMFLAGS_AWAY, time(NULL)); 1345 serv_got_im(gc, userinfo->sn, tmp, flags, time(NULL));
1331 g_free(tmp); 1346 g_free(tmp);
1332 1347
1333 return 1; 1348 return 1;
1334 } 1349 }
1335 1350
2074 struct aim_sendimext_args args; 2089 struct aim_sendimext_args args;
2075 GSList *h = odata->hasicons; 2090 GSList *h = odata->hasicons;
2076 struct icon_req *ir = NULL; 2091 struct icon_req *ir = NULL;
2077 char *who = normalize(name); 2092 char *who = normalize(name);
2078 struct stat st; 2093 struct stat st;
2079 static fu8_t features[] = {0x01, 0x01, 0x01, 0x02, 0x66};
2080 2094
2081 args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES; 2095 args.flags = AIM_IMFLAGS_ACK | AIM_IMFLAGS_CUSTOMFEATURES;
2082 2096
2083 args.features = features; 2097 args.features = gaim_features;
2084 args.featureslen = sizeof(features); 2098 args.featureslen = sizeof(gaim_features);
2085 2099
2086 while (h) { 2100 while (h) {
2087 ir = h->data; 2101 ir = h->data;
2088 if (ir->request && !strcmp(who, ir->user)) 2102 if (ir->request && !strcmp(who, ir->user))
2089 break; 2103 break;