comparison src/protocols/oscar/im.c @ 4662:6d8a3e81db48

[gaim-migrate @ 4973] I removed AIM_IMFLAGS_CUSTOMCHARSET because I think it's a little misleading, and a little silly. 3rd party client developers!!! You must set args.charset and args.charsubset before calling aim_im_sendch1_ext. Just set them to 0 for plain ASCII. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 07 Mar 2003 06:39:10 +0000
parents 4938d12f6d48
children 60d8c5ad77f9
comparison
equal deleted inserted replaced
4661:ccc304cb0389 4662:6d8a3e81db48
341 341
342 /* Message block length */ 342 /* Message block length */
343 aimbs_put16(&fr->data, args->msglen + 0x04); 343 aimbs_put16(&fr->data, args->msglen + 0x04);
344 344
345 /* Character set */ 345 /* Character set */
346 if (args->flags & AIM_IMFLAGS_CUSTOMCHARSET) { 346 aimbs_put16(&fr->data, args->charset);
347 aimbs_put16(&fr->data, args->charset); 347 aimbs_put16(&fr->data, args->charsubset);
348 aimbs_put16(&fr->data, args->charsubset);
349 } else {
350 if (args->flags & AIM_IMFLAGS_UNICODE)
351 aimbs_put16(&fr->data, 0x0002);
352 else if (args->flags & AIM_IMFLAGS_ISO_8859_1)
353 aimbs_put16(&fr->data, 0x0003);
354 else
355 aimbs_put16(&fr->data, 0x0000);
356
357 aimbs_put16(&fr->data, 0x0000);
358 }
359 348
360 /* Message. Not terminated */ 349 /* Message. Not terminated */
361 aimbs_putraw(&fr->data, args->msg, args->msglen); 350 aimbs_putraw(&fr->data, args->msg, args->msglen);
362 } 351 }
363 352
426 415
427 args.destsn = sn; 416 args.destsn = sn;
428 args.flags = flags; 417 args.flags = flags;
429 args.msg = msg; 418 args.msg = msg;
430 args.msglen = strlen(msg); 419 args.msglen = strlen(msg);
420 args.charset = 0x0000;
421 args.charsubset = 0x0000;
431 422
432 /* Make these don't get set by accident -- they need aim_im_sendch1_ext */ 423 /* Make these don't get set by accident -- they need aim_im_sendch1_ext */
433 args.flags &= ~(AIM_IMFLAGS_CUSTOMFEATURES | AIM_IMFLAGS_HASICON | AIM_IMFLAGS_MULTIPART); 424 args.flags &= ~(AIM_IMFLAGS_CUSTOMFEATURES | AIM_IMFLAGS_HASICON | AIM_IMFLAGS_MULTIPART);
434 425
435 return aim_im_sendch1_ext(sess, &args); 426 return aim_im_sendch1_ext(sess, &args);
1302 continue; 1293 continue;
1303 1294
1304 /* Great. We found one. Fill it in. */ 1295 /* Great. We found one. Fill it in. */
1305 args->charset = sec->charset; 1296 args->charset = sec->charset;
1306 args->charsubset = sec->charsubset; 1297 args->charsubset = sec->charsubset;
1307 args->icbmflags |= AIM_IMFLAGS_CUSTOMCHARSET;
1308 1298
1309 /* Set up the simple flags */ 1299 /* Set up the simple flags */
1310 if (args->charset == 0x0000) 1300 if (args->charset == 0x0000)
1311 ; /* ASCII */ 1301 ; /* ASCII */
1312 else if (args->charset == 0x0002) 1302 else if (args->charset == 0x0002)