comparison libpurple/protocols/oscar/oscar.c @ 28810:328a7ff06110

Use the od->icq boolean in a few places where we were calling oscar_util_valid_name_icq() on our own username
author Mark Doliner <mark@kingant.net>
date Mon, 21 Dec 2009 09:57:06 +0000
parents a299f96fb25c
children 3a43e48c870e
comparison
equal deleted inserted replaced
28809:4066bd054421 28810:328a7ff06110
376 376
377 return utf8; 377 return utf8;
378 } 378 }
379 379
380 static gchar * 380 static gchar *
381 oscar_utf8_try_convert(PurpleAccount *account, const gchar *msg) 381 oscar_utf8_try_convert(PurpleAccount *account, OscarData *od, const gchar *msg)
382 { 382 {
383 const char *charset = NULL; 383 const char *charset = NULL;
384 char *ret = NULL; 384 char *ret = NULL;
385 385
386 if(oscar_util_valid_name_icq(purple_account_get_username(account))) 386 if (od->icq)
387 charset = purple_account_get_string(account, "encoding", NULL); 387 charset = purple_account_get_string(account, "encoding", NULL);
388 388
389 if(charset && *charset) 389 if(charset && *charset)
390 ret = g_convert(msg, -1, "UTF-8", charset, NULL, NULL, NULL); 390 ret = g_convert(msg, -1, "UTF-8", charset, NULL, NULL, NULL);
391 391
796 purple_notify_user_info_add_pair(user_info, name, value); 796 purple_notify_user_info_add_pair(user_info, name, value);
797 } 797 }
798 } 798 }
799 799
800 static void 800 static void
801 oscar_user_info_convert_and_add_pair(PurpleAccount *account, PurpleNotifyUserInfo *user_info, 801 oscar_user_info_convert_and_add_pair(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info,
802 const char *name, const char *value) 802 const char *name, const char *value)
803 { 803 {
804 gchar *utf8; 804 gchar *utf8;
805 805
806 if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { 806 if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) {
807 purple_notify_user_info_add_pair(user_info, name, utf8); 807 purple_notify_user_info_add_pair(user_info, name, utf8);
808 g_free(utf8); 808 g_free(utf8);
809 } 809 }
810 } 810 }
811 811
812 static void 812 static void
813 oscar_user_info_convert_and_add(PurpleAccount *account, PurpleNotifyUserInfo *user_info, 813 oscar_user_info_convert_and_add(PurpleAccount *account, OscarData *od, PurpleNotifyUserInfo *user_info,
814 const char *name, const char *value) 814 const char *name, const char *value)
815 { 815 {
816 gchar *utf8; 816 gchar *utf8;
817 817
818 if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, value))) { 818 if (value && value[0] && (utf8 = oscar_utf8_try_convert(account, od, value))) {
819 purple_notify_user_info_add_pair(user_info, name, utf8); 819 purple_notify_user_info_add_pair(user_info, name, utf8);
820 g_free(utf8); 820 g_free(utf8);
821 } 821 }
822 } 822 }
823 823
1020 tmp = aim_ssi_getcomment(od->ssi.local, gname, bname); 1020 tmp = aim_ssi_getcomment(od->ssi.local, gname, bname);
1021 if (tmp != NULL) { 1021 if (tmp != NULL) {
1022 char *tmp2 = g_markup_escape_text(tmp, strlen(tmp)); 1022 char *tmp2 = g_markup_escape_text(tmp, strlen(tmp));
1023 g_free(tmp); 1023 g_free(tmp);
1024 1024
1025 oscar_user_info_convert_and_add_pair(account, user_info, _("Buddy Comment"), tmp2); 1025 oscar_user_info_convert_and_add_pair(account, od, user_info, _("Buddy Comment"), tmp2);
1026 g_free(tmp2); 1026 g_free(tmp2);
1027 } 1027 }
1028 } 1028 }
1029 } 1029 }
1030 1030
2448 * replaced with <br> 2448 * replaced with <br>
2449 * 2449 *
2450 * Note: There *may* be some clients which send messages as HTML formatted - 2450 * Note: There *may* be some clients which send messages as HTML formatted -
2451 * they need to be special-cased somehow. 2451 * they need to be special-cased somehow.
2452 */ 2452 */
2453 if (oscar_util_valid_name_icq(purple_account_get_username(account)) && oscar_util_valid_name_icq(userinfo->bn)) { 2453 if (od->icq && oscar_util_valid_name_icq(userinfo->bn)) {
2454 /* being recevied by ICQ from ICQ - escape HTML so it is displayed as sent */ 2454 /* being recevied by ICQ from ICQ - escape HTML so it is displayed as sent */
2455 gchar *tmp2 = g_markup_escape_text(tmp, -1); 2455 gchar *tmp2 = g_markup_escape_text(tmp, -1);
2456 g_free(tmp); 2456 g_free(tmp);
2457 tmp = tmp2; 2457 tmp = tmp2;
2458 tmp2 = purple_strreplace(tmp, "\r\n", "<br>"); 2458 tmp2 = purple_strreplace(tmp, "\r\n", "<br>");
4171 bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, purple_buddy_get_name(buddy))); 4171 bi = g_hash_table_lookup(od->buddyinfo, purple_normalize(account, purple_buddy_get_name(buddy)));
4172 else 4172 else
4173 bi = NULL; 4173 bi = NULL;
4174 4174
4175 purple_notify_user_info_add_pair(user_info, _("UIN"), who); 4175 purple_notify_user_info_add_pair(user_info, _("UIN"), who);
4176 oscar_user_info_convert_and_add(account, user_info, _("Nick"), info->nick); 4176 oscar_user_info_convert_and_add(account, od, user_info, _("Nick"), info->nick);
4177 if ((bi != NULL) && (bi->ipaddr != 0)) { 4177 if ((bi != NULL) && (bi->ipaddr != 0)) {
4178 char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu", 4178 char *tstr = g_strdup_printf("%hhu.%hhu.%hhu.%hhu",
4179 (bi->ipaddr & 0xff000000) >> 24, 4179 (bi->ipaddr & 0xff000000) >> 24,
4180 (bi->ipaddr & 0x00ff0000) >> 16, 4180 (bi->ipaddr & 0x00ff0000) >> 16,
4181 (bi->ipaddr & 0x0000ff00) >> 8, 4181 (bi->ipaddr & 0x0000ff00) >> 8,
4182 (bi->ipaddr & 0x000000ff)); 4182 (bi->ipaddr & 0x000000ff));
4183 purple_notify_user_info_add_pair(user_info, _("IP Address"), tstr); 4183 purple_notify_user_info_add_pair(user_info, _("IP Address"), tstr);
4184 g_free(tstr); 4184 g_free(tstr);
4185 } 4185 }
4186 oscar_user_info_convert_and_add(account, user_info, _("First Name"), info->first); 4186 oscar_user_info_convert_and_add(account, od, user_info, _("First Name"), info->first);
4187 oscar_user_info_convert_and_add(account, user_info, _("Last Name"), info->last); 4187 oscar_user_info_convert_and_add(account, od, user_info, _("Last Name"), info->last);
4188 if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(account, info->email))) { 4188 if (info->email && info->email[0] && (utf8 = oscar_utf8_try_convert(account, od, info->email))) {
4189 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); 4189 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8);
4190 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); 4190 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf);
4191 g_free(buf); 4191 g_free(buf);
4192 g_free(utf8); 4192 g_free(utf8);
4193 } 4193 }
4194 if (info->numaddresses && info->email2) { 4194 if (info->numaddresses && info->email2) {
4195 int i; 4195 int i;
4196 for (i = 0; i < info->numaddresses; i++) { 4196 for (i = 0; i < info->numaddresses; i++) {
4197 if (info->email2[i] && info->email2[i][0] && (utf8 = oscar_utf8_try_convert(account, info->email2[i]))) { 4197 if (info->email2[i] && info->email2[i][0] && (utf8 = oscar_utf8_try_convert(account, od, info->email2[i]))) {
4198 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8); 4198 buf = g_strdup_printf("<a href=\"mailto:%s\">%s</a>", utf8, utf8);
4199 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf); 4199 purple_notify_user_info_add_pair(user_info, _("Email Address"), buf);
4200 g_free(buf); 4200 g_free(buf);
4201 g_free(utf8); 4201 g_free(utf8);
4202 } 4202 }
4203 } 4203 }
4204 } 4204 }
4205 oscar_user_info_convert_and_add(account, user_info, _("Mobile Phone"), info->mobile); 4205 oscar_user_info_convert_and_add(account, od, user_info, _("Mobile Phone"), info->mobile);
4206 4206
4207 if (info->gender != 0) 4207 if (info->gender != 0)
4208 purple_notify_user_info_add_pair(user_info, _("Gender"), (info->gender == 1 ? _("Female") : _("Male"))); 4208 purple_notify_user_info_add_pair(user_info, _("Gender"), (info->gender == 1 ? _("Female") : _("Male")));
4209 4209
4210 if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) { 4210 if ((info->birthyear > 1900) && (info->birthmonth > 0) && (info->birthday > 0)) {
4220 /* To be 100% sure that the fields are re-normalized. 4220 /* To be 100% sure that the fields are re-normalized.
4221 * If you're sure strftime() ALWAYS does this EVERYWHERE, 4221 * If you're sure strftime() ALWAYS does this EVERYWHERE,
4222 * feel free to remove it. --rlaager */ 4222 * feel free to remove it. --rlaager */
4223 mktime(tm); 4223 mktime(tm);
4224 4224
4225 oscar_user_info_convert_and_add(account, user_info, _("Birthday"), purple_date_format_short(tm)); 4225 oscar_user_info_convert_and_add(account, od, user_info, _("Birthday"), purple_date_format_short(tm));
4226 } 4226 }
4227 if ((info->age > 0) && (info->age < 255)) { 4227 if ((info->age > 0) && (info->age < 255)) {
4228 char age[5]; 4228 char age[5];
4229 snprintf(age, sizeof(age), "%hhd", info->age); 4229 snprintf(age, sizeof(age), "%hhd", info->age);
4230 purple_notify_user_info_add_pair(user_info, _("Age"), age); 4230 purple_notify_user_info_add_pair(user_info, _("Age"), age);
4231 } 4231 }
4232 if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(account, info->personalwebpage))) { 4232 if (info->personalwebpage && info->personalwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->personalwebpage))) {
4233 buf = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); 4233 buf = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8);
4234 purple_notify_user_info_add_pair(user_info, _("Personal Web Page"), buf); 4234 purple_notify_user_info_add_pair(user_info, _("Personal Web Page"), buf);
4235 g_free(buf); 4235 g_free(buf);
4236 g_free(utf8); 4236 g_free(utf8);
4237 } 4237 }
4238 4238
4239 if (buddy != NULL) 4239 if (buddy != NULL)
4240 oscar_user_info_append_status(gc, user_info, buddy, /* aim_userinfo_t */ NULL, /* strip_html_tags */ FALSE); 4240 oscar_user_info_append_status(gc, user_info, buddy, /* aim_userinfo_t */ NULL, /* strip_html_tags */ FALSE);
4241 4241
4242 oscar_user_info_convert_and_add(account, user_info, _("Additional Information"), info->info); 4242 oscar_user_info_convert_and_add(account, od, user_info, _("Additional Information"), info->info);
4243 purple_notify_user_info_add_section_break(user_info); 4243 purple_notify_user_info_add_section_break(user_info);
4244 4244
4245 if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) { 4245 if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) {
4246 purple_notify_user_info_add_section_header(user_info, _("Home Address")); 4246 purple_notify_user_info_add_section_header(user_info, _("Home Address"));
4247 4247
4248 oscar_user_info_convert_and_add(account, user_info, _("Address"), info->homeaddr); 4248 oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->homeaddr);
4249 oscar_user_info_convert_and_add(account, user_info, _("City"), info->homecity); 4249 oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->homecity);
4250 oscar_user_info_convert_and_add(account, user_info, _("State"), info->homestate); 4250 oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->homestate);
4251 oscar_user_info_convert_and_add(account, user_info, _("Zip Code"), info->homezip); 4251 oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->homezip);
4252 } 4252 }
4253 if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) { 4253 if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) {
4254 purple_notify_user_info_add_section_header(user_info, _("Work Address")); 4254 purple_notify_user_info_add_section_header(user_info, _("Work Address"));
4255 4255
4256 oscar_user_info_convert_and_add(account, user_info, _("Address"), info->workaddr); 4256 oscar_user_info_convert_and_add(account, od, user_info, _("Address"), info->workaddr);
4257 oscar_user_info_convert_and_add(account, user_info, _("City"), info->workcity); 4257 oscar_user_info_convert_and_add(account, od, user_info, _("City"), info->workcity);
4258 oscar_user_info_convert_and_add(account, user_info, _("State"), info->workstate); 4258 oscar_user_info_convert_and_add(account, od, user_info, _("State"), info->workstate);
4259 oscar_user_info_convert_and_add(account, user_info, _("Zip Code"), info->workzip); 4259 oscar_user_info_convert_and_add(account, od, user_info, _("Zip Code"), info->workzip);
4260 } 4260 }
4261 if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) { 4261 if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) {
4262 purple_notify_user_info_add_section_header(user_info, _("Work Information")); 4262 purple_notify_user_info_add_section_header(user_info, _("Work Information"));
4263 4263
4264 oscar_user_info_convert_and_add(account, user_info, _("Company"), info->workcompany); 4264 oscar_user_info_convert_and_add(account, od, user_info, _("Company"), info->workcompany);
4265 oscar_user_info_convert_and_add(account, user_info, _("Division"), info->workdivision); 4265 oscar_user_info_convert_and_add(account, od, user_info, _("Division"), info->workdivision);
4266 oscar_user_info_convert_and_add(account, user_info, _("Position"), info->workposition); 4266 oscar_user_info_convert_and_add(account, od, user_info, _("Position"), info->workposition);
4267 4267
4268 if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(account, info->workwebpage))) { 4268 if (info->workwebpage && info->workwebpage[0] && (utf8 = oscar_utf8_try_convert(account, od, info->workwebpage))) {
4269 char *webpage = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8); 4269 char *webpage = g_strdup_printf("<a href=\"%s\">%s</a>", utf8, utf8);
4270 purple_notify_user_info_add_pair(user_info, _("Web Page"), webpage); 4270 purple_notify_user_info_add_pair(user_info, _("Web Page"), webpage);
4271 g_free(webpage); 4271 g_free(webpage);
4272 g_free(utf8); 4272 g_free(utf8);
4273 } 4273 }
4294 4294
4295 va_start(ap, fr); 4295 va_start(ap, fr);
4296 info = va_arg(ap, struct aim_icq_info *); 4296 info = va_arg(ap, struct aim_icq_info *);
4297 va_end(ap); 4297 va_end(ap);
4298 4298
4299 if (info->uin && info->nick && info->nick[0] && (utf8 = oscar_utf8_try_convert(account, info->nick))) { 4299 if (info->uin && info->nick && info->nick[0] && (utf8 = oscar_utf8_try_convert(account, od, info->nick))) {
4300 g_snprintf(who, sizeof(who), "%u", info->uin); 4300 g_snprintf(who, sizeof(who), "%u", info->uin);
4301 serv_got_alias(gc, who, utf8); 4301 serv_got_alias(gc, who, utf8);
4302 if ((b = purple_find_buddy(account, who))) { 4302 if ((b = purple_find_buddy(account, who))) {
4303 purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8); 4303 purple_blist_node_set_string((PurpleBlistNode*)b, "servernick", utf8);
4304 } 4304 }
4749 */ 4749 */
4750 if (oscar_util_valid_name_sms(name)) { 4750 if (oscar_util_valid_name_sms(name)) {
4751 /* Messaging an SMS (mobile) user */ 4751 /* Messaging an SMS (mobile) user */
4752 tmp2 = purple_markup_strip_html(tmp1); 4752 tmp2 = purple_markup_strip_html(tmp1);
4753 is_html = FALSE; 4753 is_html = FALSE;
4754 } else if (oscar_util_valid_name_icq(purple_account_get_username(account))) { 4754 } else if (od->icq) {
4755 if (oscar_util_valid_name_icq(name)) { 4755 if (oscar_util_valid_name_icq(name)) {
4756 /* From ICQ to ICQ */ 4756 /* From ICQ to ICQ */
4757 tmp2 = purple_markup_strip_html(tmp1); 4757 tmp2 = purple_markup_strip_html(tmp1);
4758 is_html = FALSE; 4758 is_html = FALSE;
4759 } else { 4759 } else {
5045 } 5045 }
5046 5046
5047 void 5047 void
5048 oscar_set_status(PurpleAccount *account, PurpleStatus *status) 5048 oscar_set_status(PurpleAccount *account, PurpleStatus *status)
5049 { 5049 {
5050 PurpleConnection *pc;
5051 OscarData *od;
5052
5050 purple_debug_info("oscar", "Set status to %s\n", purple_status_get_name(status)); 5053 purple_debug_info("oscar", "Set status to %s\n", purple_status_get_name(status));
5051 5054
5052 if (!purple_status_is_active(status)) 5055 if (!purple_status_is_active(status))
5053 return; 5056 return;
5054 5057
5055 if (!purple_account_is_connected(account)) 5058 if (!purple_account_is_connected(account))
5056 return; 5059 return;
5057 5060
5061 pc = purple_account_get_connection(account);
5062 od = purple_connection_get_protocol_data(pc);
5063
5058 /* Set the AIM-style away message for both AIM and ICQ accounts */ 5064 /* Set the AIM-style away message for both AIM and ICQ accounts */
5059 oscar_set_info_and_status(account, FALSE, NULL, TRUE, status); 5065 oscar_set_info_and_status(account, FALSE, NULL, TRUE, status);
5060 5066
5061 /* Set the ICQ status for ICQ accounts only */ 5067 /* Set the ICQ status for ICQ accounts only */
5062 if (oscar_util_valid_name_icq(purple_account_get_username(account))) 5068 if (od->icq)
5063 oscar_set_status_icq(account); 5069 oscar_set_status_icq(account);
5064 } 5070 }
5065 5071
5066 #ifdef CRAZY_WARN 5072 #ifdef CRAZY_WARN
5067 void 5073 void
5402 gname = groupitem ? groupitem->name : NULL; 5408 gname = groupitem ? groupitem->name : NULL;
5403 if (gname != NULL) { 5409 if (gname != NULL) {
5404 if (g_utf8_validate(gname, -1, NULL)) 5410 if (g_utf8_validate(gname, -1, NULL))
5405 gname_utf8 = g_strdup(gname); 5411 gname_utf8 = g_strdup(gname);
5406 else 5412 else
5407 gname_utf8 = oscar_utf8_try_convert(account, gname); 5413 gname_utf8 = oscar_utf8_try_convert(account, od, gname);
5408 } else 5414 } else
5409 gname_utf8 = NULL; 5415 gname_utf8 = NULL;
5410 5416
5411 g = purple_find_group(gname_utf8 ? gname_utf8 : _("Orphans")); 5417 g = purple_find_group(gname_utf8 ? gname_utf8 : _("Orphans"));
5412 if (g == NULL) { 5418 if (g == NULL) {
5417 alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name); 5423 alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name);
5418 if (alias != NULL) { 5424 if (alias != NULL) {
5419 if (g_utf8_validate(alias, -1, NULL)) 5425 if (g_utf8_validate(alias, -1, NULL))
5420 alias_utf8 = g_strdup(alias); 5426 alias_utf8 = g_strdup(alias);
5421 else 5427 else
5422 alias_utf8 = oscar_utf8_try_convert(account, alias); 5428 alias_utf8 = oscar_utf8_try_convert(account, od, alias);
5423 g_free(alias); 5429 g_free(alias);
5424 } else 5430 } else
5425 alias_utf8 = NULL; 5431 alias_utf8 = NULL;
5426 5432
5427 b = purple_find_buddy_in_group(account, curitem->name, g); 5433 b = purple_find_buddy_in_group(account, curitem->name, g);
5466 gname = curitem->name; 5472 gname = curitem->name;
5467 if (gname != NULL) { 5473 if (gname != NULL) {
5468 if (g_utf8_validate(gname, -1, NULL)) 5474 if (g_utf8_validate(gname, -1, NULL))
5469 gname_utf8 = g_strdup(gname); 5475 gname_utf8 = g_strdup(gname);
5470 else 5476 else
5471 gname_utf8 = oscar_utf8_try_convert(account, gname); 5477 gname_utf8 = oscar_utf8_try_convert(account, od, gname);
5472 } else 5478 } else
5473 gname_utf8 = NULL; 5479 gname_utf8 = NULL;
5474 5480
5475 if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) { 5481 if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) {
5476 g = purple_group_new(gname_utf8); 5482 g = purple_group_new(gname_utf8);
5634 5640
5635 if ((type != 0x0000) || (name == NULL)) 5641 if ((type != 0x0000) || (name == NULL))
5636 return 1; 5642 return 1;
5637 5643
5638 gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); 5644 gname = aim_ssi_itemlist_findparentname(od->ssi.local, name);
5639 gname_utf8 = gname ? oscar_utf8_try_convert(account, gname) : NULL; 5645 gname_utf8 = gname ? oscar_utf8_try_convert(account, od, gname) : NULL;
5640 5646
5641 alias = aim_ssi_getalias(od->ssi.local, gname, name); 5647 alias = aim_ssi_getalias(od->ssi.local, gname, name);
5642 if (alias != NULL) 5648 if (alias != NULL)
5643 { 5649 {
5644 if (g_utf8_validate(alias, -1, NULL)) 5650 if (g_utf8_validate(alias, -1, NULL))
5645 alias_utf8 = g_strdup(alias); 5651 alias_utf8 = g_strdup(alias);
5646 else 5652 else
5647 alias_utf8 = oscar_utf8_try_convert(account, alias); 5653 alias_utf8 = oscar_utf8_try_convert(account, od, alias);
5648 } 5654 }
5649 else 5655 else
5650 alias_utf8 = NULL; 5656 alias_utf8 = NULL;
5651 g_free(alias); 5657 g_free(alias);
5652 5658
6415 return; 6421 return;
6416 6422
6417 data = g_new(struct name_data, 1); 6423 data = g_new(struct name_data, 1);
6418 6424
6419 comment = aim_ssi_getcomment(od->ssi.local, purple_group_get_name(g), name); 6425 comment = aim_ssi_getcomment(od->ssi.local, purple_group_get_name(g), name);
6420 comment_utf8 = comment ? oscar_utf8_try_convert(account, comment) : NULL; 6426 comment_utf8 = comment ? oscar_utf8_try_convert(account, od, comment) : NULL;
6421 6427
6422 data->gc = gc; 6428 data->gc = gc;
6423 data->name = g_strdup(name); 6429 data->name = g_strdup(name);
6424 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); 6430 data->nick = g_strdup(purple_buddy_get_alias_only(buddy));
6425 6431