changeset 27934:c1f1ed4d7a12

now yahoo plugin can obtain room list in yahoo jp service.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 15 Mar 2009 10:39:42 +0000
parents f44832c6a65b
children f33f4ddbf01a
files libpurple/protocols/yahoo/yahoochat.c
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoochat.c	Sun Mar 08 20:38:09 2009 +0000
+++ b/libpurple/protocols/yahoo/yahoochat.c	Sun Mar 15 10:39:42 2009 +0000
@@ -1555,6 +1555,7 @@
 	char *url;
 	char *id;
 	const char *rll;
+	gboolean jp = purple_account_get_bool(list->account, "yahoojp", FALSE);
 
 	if (category->type != PURPLE_ROOMLIST_ROOMTYPE_CATEGORY)
 		return;
@@ -1564,17 +1565,12 @@
 		return;
 	}
 
-	rll = purple_account_get_string(list->account, "room_list_locale",
-								  YAHOO_ROOMLIST_LOCALE);
+	rll = jp ? YAHOOJP_ROOMLIST_LOCALE : purple_account_get_string(list->account, "room_list_locale", YAHOO_ROOMLIST_LOCALE);
 
 	if (rll != NULL && *rll != '\0') {
-		url = g_strdup_printf("%s?chatroom_%s=0&intl=%s",
-	       purple_account_get_string(list->account,"room_list",
-	       YAHOO_ROOMLIST_URL), id, rll);
+		url = g_strdup_printf("%s?chatroom_%s=0&intl=%s", jp ? YAHOOJP_ROOMLIST_URL : purple_account_get_string(list->account,"room_list", YAHOO_ROOMLIST_URL), id, rll);
 	} else {
-		url = g_strdup_printf("%s?chatroom_%s=0",
-	       purple_account_get_string(list->account,"room_list",
-	       YAHOO_ROOMLIST_URL), id);
+		url = g_strdup_printf("%s?chatroom_%s=0", jp ? YAHOOJP_ROOMLIST_URL : purple_account_get_string(list->account,"room_list", YAHOO_ROOMLIST_URL), id);
 	}
 
 	yrl = g_new0(struct yahoo_roomlist, 1);