Mercurial > pidgin
comparison libpurple/protocols/gg/gg.c @ 31086:a8cc50c2279f
Remove trailing whitespace
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 04 Jan 2011 06:55:30 +0000 |
parents | fb6312881d56 |
children | 1607b413a139 |
comparison
equal
deleted
inserted
replaced
31085:44f53d3fc54f | 31086:a8cc50c2279f |
---|---|
213 GGPInfo *info = gc->proto_data; | 213 GGPInfo *info = gc->proto_data; |
214 | 214 |
215 char *buddylist = ggp_buddylist_dump(purple_connection_get_account(gc)); | 215 char *buddylist = ggp_buddylist_dump(purple_connection_get_account(gc)); |
216 | 216 |
217 purple_debug_info("gg", "Uploading...\n"); | 217 purple_debug_info("gg", "Uploading...\n"); |
218 | 218 |
219 if (buddylist == NULL) | 219 if (buddylist == NULL) |
220 return; | 220 return; |
221 | 221 |
222 gg_userlist_request(info->session, GG_USERLIST_PUT, buddylist); | 222 gg_userlist_request(info->session, GG_USERLIST_PUT, buddylist); |
223 g_free(buddylist); | 223 g_free(buddylist); |
1727 purple_debug_info("gg", "GG_EVENT_CONN_SUCCESS\n"); | 1727 purple_debug_info("gg", "GG_EVENT_CONN_SUCCESS\n"); |
1728 purple_input_remove(gc->inpa); | 1728 purple_input_remove(gc->inpa); |
1729 gc->inpa = purple_input_add(info->session->fd, | 1729 gc->inpa = purple_input_add(info->session->fd, |
1730 PURPLE_INPUT_READ, | 1730 PURPLE_INPUT_READ, |
1731 ggp_callback_recv, gc); | 1731 ggp_callback_recv, gc); |
1732 | 1732 |
1733 ggp_buddylist_send(gc); | 1733 ggp_buddylist_send(gc); |
1734 purple_connection_update_progress(gc, _("Connected"), 1, 2); | 1734 purple_connection_update_progress(gc, _("Connected"), 1, 2); |
1735 purple_connection_set_state(gc, PURPLE_CONNECTED); | 1735 purple_connection_set_state(gc, PURPLE_CONNECTED); |
1736 } | 1736 } |
1737 break; | 1737 break; |
1842 "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), | 1842 "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), |
1843 NULL); | 1843 NULL); |
1844 types = g_list_append(types, type); | 1844 types = g_list_append(types, type); |
1845 | 1845 |
1846 /* | 1846 /* |
1847 * New statuses for GG 8.0 like PoGGadaj ze mna (not yet because | 1847 * New statuses for GG 8.0 like PoGGadaj ze mna (not yet because |
1848 * libpurple can't support Chatty status) and Nie przeszkadzac | 1848 * libpurple can't support Chatty status) and Nie przeszkadzac |
1849 */ | 1849 */ |
1850 type = purple_status_type_new_with_attrs( | 1850 type = purple_status_type_new_with_attrs( |
1851 PURPLE_STATUS_UNAVAILABLE, NULL, NULL, TRUE, TRUE, FALSE, | 1851 PURPLE_STATUS_UNAVAILABLE, NULL, NULL, TRUE, TRUE, FALSE, |
1852 "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), | 1852 "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), |
1853 NULL); | 1853 NULL); |
1854 types = g_list_append(types, type); | 1854 types = g_list_append(types, type); |
1855 | 1855 |
1856 /* | 1856 /* |
1857 * This status is necessary to display guys who are blocking *us*. | 1857 * This status is necessary to display guys who are blocking *us*. |
1858 */ | 1858 */ |
1859 type = purple_status_type_new_with_attrs( | 1859 type = purple_status_type_new_with_attrs( |
1860 PURPLE_STATUS_INVISIBLE, "blocked", _("Blocked"), TRUE, FALSE, FALSE, | 1860 PURPLE_STATUS_INVISIBLE, "blocked", _("Blocked"), TRUE, FALSE, FALSE, |
1954 presence = purple_account_get_presence(account); | 1954 presence = purple_account_get_presence(account); |
1955 status = purple_presence_get_active_status(presence); | 1955 status = purple_presence_get_active_status(presence); |
1956 | 1956 |
1957 glp->encoding = GG_ENCODING_UTF8; | 1957 glp->encoding = GG_ENCODING_UTF8; |
1958 glp->protocol_features = (GG_FEATURE_STATUS80|GG_FEATURE_DND_FFC); | 1958 glp->protocol_features = (GG_FEATURE_STATUS80|GG_FEATURE_DND_FFC); |
1959 | 1959 |
1960 glp->async = 1; | 1960 glp->async = 1; |
1961 glp->status = ggp_to_gg_status(status, &glp->status_descr); | 1961 glp->status = ggp_to_gg_status(status, &glp->status_descr); |
1962 glp->tls = 0; | 1962 glp->tls = 0; |
1963 | 1963 |
1964 address = purple_account_get_string(account, "gg_server", ""); | 1964 address = purple_account_get_string(account, "gg_server", ""); |
1982 glp->server_port = 8074; | 1982 glp->server_port = 8074; |
1983 } else | 1983 } else |
1984 purple_debug_info("gg", "Trying to retrieve address from gg appmsg service\n"); | 1984 purple_debug_info("gg", "Trying to retrieve address from gg appmsg service\n"); |
1985 | 1985 |
1986 info->session = gg_login(glp); | 1986 info->session = gg_login(glp); |
1987 purple_connection_update_progress(gc, _("Connecting"), 0, 2); | 1987 purple_connection_update_progress(gc, _("Connecting"), 0, 2); |
1988 if (info->session == NULL) { | 1988 if (info->session == NULL) { |
1989 purple_connection_error_reason (gc, | 1989 purple_connection_error_reason (gc, |
1990 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, | 1990 PURPLE_CONNECTION_ERROR_NETWORK_ERROR, |
1991 _("Connection failed")); | 1991 _("Connection failed")); |
1992 g_free(glp); | 1992 g_free(glp); |
2129 | 2129 |
2130 /* | 2130 /* |
2131 tmp = charset_convert(plain, "UTF-8", "CP1250"); | 2131 tmp = charset_convert(plain, "UTF-8", "CP1250"); |
2132 */ | 2132 */ |
2133 tmp = g_strdup_printf("%s", plain); | 2133 tmp = g_strdup_printf("%s", plain); |
2134 | 2134 |
2135 if (tmp && (format_length - sizeof(struct gg_msg_richtext))) { | 2135 if (tmp && (format_length - sizeof(struct gg_msg_richtext))) { |
2136 if(gg_send_message_richtext(info->session, GG_CLASS_CHAT, ggp_str_to_uin(who), (unsigned char *)tmp, format, format_length) < 0) { | 2136 if(gg_send_message_richtext(info->session, GG_CLASS_CHAT, ggp_str_to_uin(who), (unsigned char *)tmp, format, format_length) < 0) { |
2137 ret = -1; | 2137 ret = -1; |
2138 } else { | 2138 } else { |
2139 ret = 1; | 2139 ret = 1; |