comparison src/protocols/oscar/oscar.c @ 11920:52f27ffe68a5

[gaim-migrate @ 14211] sf patch #1339035, from Sadrul Habib Chowdhury "Remove the \n in Yahoo! status messages when showing them in the buddy list inline." Also some changes from me. I changed gaim_str_strip_cr(char *text) to gaim_str_strip_char(char *text, char thechar). I don't know why, really, but it seems like it could be more useful this way. Eh committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 31 Oct 2005 04:27:06 +0000
parents 700ec4523c04
children bcdc6eba1700
comparison
equal deleted inserted replaced
11919:51832ad72a6b 11920:52f27ffe68a5
4522 */ 4522 */
4523 msg1 = g_strsplit(args->msg, "\376", (args->type == 0x01 ? 1 : 0)); 4523 msg1 = g_strsplit(args->msg, "\376", (args->type == 0x01 ? 1 : 0));
4524 for (numtoks=0; msg1[numtoks]; numtoks++); 4524 for (numtoks=0; msg1[numtoks]; numtoks++);
4525 msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *)); 4525 msg2 = (gchar **)g_malloc((numtoks+1)*sizeof(gchar *));
4526 for (i=0; msg1[i]; i++) { 4526 for (i=0; msg1[i]; i++) {
4527 gaim_str_strip_cr(msg1[i]); 4527 gaim_str_strip_char(msg1[i], '\r');
4528 msg2[i] = gaim_plugin_oscar_decode_im_part(account, "1", AIM_CHARSET_ASCII, 0x0000, msg1[i], strlen(msg1[i])); 4528 msg2[i] = gaim_plugin_oscar_decode_im_part(account, "1", AIM_CHARSET_ASCII, 0x0000, msg1[i], strlen(msg1[i]));
4529 } 4529 }
4530 msg2[i] = NULL; 4530 msg2[i] = NULL;
4531 4531
4532 switch (args->type) { 4532 switch (args->type) {
5087 } 5087 }
5088 } 5088 }
5089 5089
5090 tmp = gaim_str_sub_away_formatters(str->str, gaim_account_get_username(account)); 5090 tmp = gaim_str_sub_away_formatters(str->str, gaim_account_get_username(account));
5091 g_string_free(str, TRUE); 5091 g_string_free(str, TRUE);
5092 gaim_str_strip_cr(tmp); 5092 gaim_str_strip_char(tmp, '\r');
5093 gaim_notify_userinfo(gc, userinfo->sn, tmp, NULL, NULL); 5093 gaim_notify_userinfo(gc, userinfo->sn, tmp, NULL, NULL);
5094 g_free(tmp); 5094 g_free(tmp);
5095 5095
5096 return 1; 5096 return 1;
5097 } 5097 }