comparison libpurple/protocols/qq/qq.c @ 24090:6408be948d56

disapproval of revision '92d52eef2994d2697999177804e3665989cfa352'
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 15 Sep 2008 03:03:59 +0000
parents 2f5a7edd8f68
children 5c030dc88356
comparison
equal deleted inserted replaced
24089:2f5a7edd8f68 24090:6408be948d56
95 g_return_if_fail(gc != NULL && gc->proto_data != NULL); 95 g_return_if_fail(gc != NULL && gc->proto_data != NULL);
96 qd = gc->proto_data; 96 qd = gc->proto_data;
97 97
98 gpi = purple_proxy_get_setup(account); 98 gpi = purple_proxy_get_setup(account);
99 99
100 qd->use_tcp = purple_account_get_bool(account, "use_tcp", TRUE); 100 qd->use_tcp = TRUE;
101 if (purple_proxy_info_get_type(gpi) == PURPLE_PROXY_UDP) {
102 qd->use_tcp = FALSE;
103 }
101 104
102 user_server = purple_account_get_string(account, "server", NULL); 105 user_server = purple_account_get_string(account, "server", NULL);
103 purple_debug_info("QQ", "Select server '%s'\n", user_server); 106 purple_debug_info("QQ", "Select server '%s'\n", user_server);
104 if ( (user_server != NULL && strlen(user_server) > 0) && strcasecmp(user_server, "auto") != 0) { 107 if ( (user_server != NULL && strlen(user_server) > 0) && strcasecmp(user_server, "auto") != 0) {
105 qd->servers = g_list_append(qd->servers, g_strdup(user_server)); 108 qd->servers = g_list_append(qd->servers, g_strdup(user_server));
463 purple_debug_error("QQ", "Not valid QQid: %s\n", who); 466 purple_debug_error("QQ", "Not valid QQid: %s\n", who);
464 purple_notify_error(gc, NULL, _("Invalid name"), NULL); 467 purple_notify_error(gc, NULL, _("Invalid name"), NULL);
465 return; 468 return;
466 } 469 }
467 470
468 qq_request_get_level(gc, uid); 471 qq_send_packet_get_level(gc, uid);
469 qq_send_packet_get_info(gc, uid, TRUE); 472 qq_send_packet_get_info(gc, uid, TRUE);
470 } 473 }
471 474
472 /* get my own information */ 475 /* get my own information */
473 static void _qq_menu_modify_my_info(PurplePluginAction *action) 476 static void _qq_menu_modify_my_info(PurplePluginAction *action)
840 kvlist = g_list_append(kvlist, kvp); 843 kvlist = g_list_append(kvlist, kvp);
841 } 844 }
842 entry = entry->next; 845 entry = entry->next;
843 } 846 }
844 847
848 /*
849 option = purple_account_option_string_new(_("Server"), "server", NULL);
850 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
851
852 option = purple_account_option_int_new(_("Port"), "port", 0);
853 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
854 */
845 option = purple_account_option_list_new(_("Server"), "server", kvlist); 855 option = purple_account_option_list_new(_("Server"), "server", kvlist);
846 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
847
848 option = purple_account_option_bool_new(_("Connect by TCP"), "use_tcp", TRUE);
849 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); 856 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
850 857
851 option = purple_account_option_bool_new(_("Show server notice"), "show_notice", TRUE); 858 option = purple_account_option_bool_new(_("Show server notice"), "show_notice", TRUE);
852 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); 859 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);
853 860