Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo.c @ 9164:76125b842b23
[gaim-migrate @ 9949]
This is proper yahoo japan support. Technically it worked before, but
you had to know the yahoo japan server, and typing in nonascii didn't work.
The account options are kind of ugly. Eventually Chip is going to replace
the check box with something more like a dropdown thingy, that automaticly
hides the settings that aren't used (Pager Host vs. Japan Pager Host, etc)
But it's not too bad now. And I think I orignally wrote this patch for
0.64 or something, so I got tired of waiting.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Wed, 02 Jun 2004 03:02:50 +0000 |
parents | c3fa2ad099a2 |
children | f0488214826f |
comparison
equal
deleted
inserted
replaced
9163:8d22bc97b7be | 9164:76125b842b23 |
---|---|
2254 | 2254 |
2255 #ifndef YAHOO_WEBMESSENGER | 2255 #ifndef YAHOO_WEBMESSENGER |
2256 | 2256 |
2257 yahoo_server_check(account); | 2257 yahoo_server_check(account); |
2258 | 2258 |
2259 if (gaim_proxy_connect(account, | 2259 if (gaim_account_get_bool(account, "yahoojp", FALSE)) { |
2260 gaim_account_get_string(account, "server", YAHOO_PAGER_HOST), | 2260 yd->jp = TRUE; |
2261 gaim_account_get_int(account, "port", YAHOO_PAGER_PORT), | 2261 if (gaim_proxy_connect(account, |
2262 yahoo_got_connected, gc) != 0) | 2262 gaim_account_get_string(account, "serverjp", YAHOOJP_PAGER_HOST), |
2263 { | 2263 gaim_account_get_int(account, "port", YAHOO_PAGER_PORT), |
2264 gaim_connection_error(gc, _("Connection problem")); | 2264 yahoo_got_connected, gc) != 0) |
2265 return; | 2265 { |
2266 } | 2266 gaim_connection_error(gc, _("Connection problem")); |
2267 | 2267 return; |
2268 } | |
2269 } else { | |
2270 yd->jp = FALSE; | |
2271 if (gaim_proxy_connect(account, | |
2272 gaim_account_get_string(account, "server", YAHOO_PAGER_HOST), | |
2273 gaim_account_get_int(account, "port", YAHOO_PAGER_PORT), | |
2274 yahoo_got_connected, gc) != 0) | |
2275 { | |
2276 gaim_connection_error(gc, _("Connection problem")); | |
2277 return; | |
2278 } | |
2279 } | |
2268 #else | 2280 #else |
2269 gaim_url_fetch(WEBMESSENGER_URL, TRUE, "Gaim/" VERSION, FALSE, | 2281 gaim_url_fetch(WEBMESSENGER_URL, TRUE, "Gaim/" VERSION, FALSE, |
2270 yahoo_login_page_cb, gc); | 2282 yahoo_login_page_cb, gc); |
2271 #endif | 2283 #endif |
2272 | 2284 |
3183 static void | 3195 static void |
3184 init_plugin(GaimPlugin *plugin) | 3196 init_plugin(GaimPlugin *plugin) |
3185 { | 3197 { |
3186 GaimAccountOption *option; | 3198 GaimAccountOption *option; |
3187 | 3199 |
3200 option = gaim_account_option_bool_new(_("Yahoo Japan"), "yahoojp", FALSE); | |
3201 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | |
3202 | |
3188 option = gaim_account_option_string_new(_("Pager host"), "server", YAHOO_PAGER_HOST); | 3203 option = gaim_account_option_string_new(_("Pager host"), "server", YAHOO_PAGER_HOST); |
3189 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 3204 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
3190 | 3205 |
3206 option = gaim_account_option_string_new(_("Japan Pager host"), "serverjp", YAHOOJP_PAGER_HOST); | |
3207 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | |
3208 | |
3191 option = gaim_account_option_int_new(_("Pager port"), "port", YAHOO_PAGER_PORT); | 3209 option = gaim_account_option_int_new(_("Pager port"), "port", YAHOO_PAGER_PORT); |
3192 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 3210 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
3193 | 3211 |
3194 option = gaim_account_option_string_new(_("File transfer host"), "xfer_host", YAHOO_XFER_HOST); | 3212 option = gaim_account_option_string_new(_("File transfer host"), "xfer_host", YAHOO_XFER_HOST); |
3195 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 3213 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
3196 | 3214 |
3215 option = gaim_account_option_string_new(_("Japan File transfer host"), "xferjp_host", YAHOOJP_XFER_HOST); | |
3216 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | |
3217 | |
3197 option = gaim_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT); | 3218 option = gaim_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT); |
3198 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 3219 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
3199 | 3220 |
3200 option = gaim_account_option_string_new(_("Chat Room List Url"), "room_list", YAHOO_ROOMLIST_URL); | 3221 option = gaim_account_option_string_new(_("Chat Room List Url"), "room_list", YAHOO_ROOMLIST_URL); |
3201 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 3222 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |