Mercurial > pidgin.yaz
changeset 11644:f4e58e94ced3
[gaim-migrate @ 13922]
Yahoo! whitespace cleanup from Peter Lawler
Gracias!
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 12 Oct 2005 04:02:46 +0000 |
parents | eb14bbcf7249 |
children | 39786dfdf6a2 |
files | src/protocols/yahoo/util.c src/protocols/yahoo/yahoo.c src/protocols/yahoo/yahoo.h src/protocols/yahoo/yahoo_auth.c src/protocols/yahoo/yahoo_auth.h src/protocols/yahoo/yahoo_doodle.h src/protocols/yahoo/yahoo_filexfer.c src/protocols/yahoo/yahoo_friend.c src/protocols/yahoo/yahoo_packet.c src/protocols/yahoo/yahoo_packet.h src/protocols/yahoo/yahoo_picture.c src/protocols/yahoo/yahoo_profile.c src/protocols/yahoo/yahoochat.c src/protocols/yahoo/ycht.c src/protocols/yahoo/ycht.h |
diffstat | 15 files changed, 46 insertions(+), 146 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/yahoo/util.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/util.c Wed Oct 12 04:02:46 2005 +0000 @@ -100,8 +100,6 @@ return g_strdup(""); } - - /* * I found these on some website but i don't know that they actually * work (or are supposed to work). I didn't implement them yet. @@ -122,10 +120,8 @@ * (shift+comma)lyellow(shift+period) ---light yellow * (shift+comma)lgreen(shift+period) ---light green [2;30m <--white out - */ - static GHashTable *ht = NULL; void yahoo_init_colorht() @@ -157,7 +153,6 @@ g_hash_table_insert(ht, "l", ""); /* link start */ g_hash_table_insert(ht, "xl", ""); /* link end */ - g_hash_table_insert(ht, "<black>", "<FONT COLOR=\"#000000\">"); g_hash_table_insert(ht, "<blue>", "<FONT COLOR=\"#0000FF\">"); g_hash_table_insert(ht, "<cyan>", "<FONT COLOR=\"#008284\">"); @@ -283,7 +278,6 @@ } } - } else if (!nomoreendtags && (x[i] == '<')) { j = i; @@ -325,8 +319,6 @@ } - - } else { if (x[i] == '<') g_string_append(s, "<"); @@ -476,8 +468,6 @@ if (src[m] == ' ') *j = m; - - if (src[m] == '>') { gboolean needendtag = 0; fontattr *f; @@ -560,10 +550,8 @@ GQueue *ftattr = NULL; gboolean no_more_specials = FALSE; - colors = g_queue_new(); tags = g_queue_new(); - dest = g_string_sized_new(strlen(src)); for (i = 0, len = strlen(src); i < len; i++) {
--- a/src/protocols/yahoo/yahoo.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Wed Oct 12 04:02:46 2005 +0000 @@ -84,11 +84,14 @@ switch (gc->account->perm_deny) { case GAIM_PRIVACY_DENY_ALL: - deb = "GAIM_PRIVACY_DENY_ALL"; break; + deb = "GAIM_PRIVACY_DENY_ALL"; + break; case GAIM_PRIVACY_DENY_USERS: - deb = "GAIM_PRIVACY_DENY_USERS"; break; + deb = "GAIM_PRIVACY_DENY_USERS"; + break; case GAIM_PRIVACY_ALLOW_BUDDYLIST: - deb = "GAIM_PRIVACY_ALLOW_BUDDYLIST"; break; + deb = "GAIM_PRIVACY_ALLOW_BUDDYLIST"; + break; } if(deb) gaim_debug_info("yahoo", @@ -380,7 +383,6 @@ GSList *list, *i; gboolean onlist = 0; char *oname = NULL; - char **oname_p = &oname; GSList **list_p = &list; @@ -562,7 +564,6 @@ g_hash_table_destroy(ht); } - if (yd->tmp_serv_ilist) { buddies = g_strsplit(yd->tmp_serv_ilist->str, ",", -1); for (bud = buddies; bud && *bud; bud++) { @@ -878,7 +879,7 @@ /* TODO: this is almost exactly the same as what MSN does, * this should probably be moved to the core. - * */ + */ prompt_msg = g_strdup_printf(_("The user %s wants to add %s to " "his or her buddy list%s%s."), add_req->who, add_req->id, @@ -942,8 +943,6 @@ static void yahoo_process_contact(GaimConnection *gc, struct yahoo_packet *pkt) { - - switch (pkt->status) { case 1: yahoo_process_status(gc, pkt); @@ -1287,16 +1286,14 @@ while (*magic_ptr != (int)NULL) { char *loc; - /* Ignore parentheses. - */ + /* Ignore parentheses. */ if (*magic_ptr == '(' || *magic_ptr == ')') { magic_ptr++; continue; } - /* Characters and digits verify against the challenge lookup. - */ + /* Characters and digits verify against the challenge lookup. */ if (isalpha(*magic_ptr) || isdigit(*magic_ptr)) { loc = strchr(challenge_lookup, *magic_ptr); @@ -1304,8 +1301,7 @@ /* SME XXX Error - disconnect here */ } - /* Get offset into lookup table and shl 3. - */ + /* Get offset into lookup table and shl 3. */ magic_work = loc - challenge_lookup; magic_work <<= 3; @@ -1322,8 +1318,7 @@ local_store = loc - operand_lookup; - /* Oops; how did this happen? - */ + /* Oops; how did this happen? */ if (magic_cnt >= 64) break; @@ -1337,15 +1332,15 @@ magic_len = magic_cnt; magic_cnt = 0; - /* Magic: Phase 2. Take generated magic value and sprinkle fairy dust on the values. + /* Magic: Phase 2. Take generated magic value and sprinkle fairy + * dust on the values. */ for (magic_cnt = magic_len-2; magic_cnt >= 0; magic_cnt--) { unsigned char byte1; unsigned char byte2; - /* Bad. Abort. - */ + /* Bad. Abort. */ if ((magic_cnt + 1 > magic_len) || (magic_cnt > magic_len)) break; @@ -1509,8 +1504,7 @@ memset(&byte, 0, 6); - /* First two bytes of digest stuffed together. - */ + /* First two bytes of digest stuffed together. */ val = digest2[x]; val <<= 8; @@ -1545,8 +1539,7 @@ strcat(resp_6, byte); } - /* Our second authentication response is based off of the crypto hash. - */ + /* Our second authentication response is based off of the crypto hash. */ cnt = 0; memset(&digest1, 0, 20); @@ -1604,8 +1597,7 @@ memset(&byte, 0, 6); - /* First two bytes of digest stuffed together. - */ + /* First two bytes of digest stuffed together. */ val = digest2[x]; val <<= 8; @@ -1664,7 +1656,6 @@ int m = 0; gchar *buf; - while (l) { struct yahoo_pair *pair = l->data; if (pair->key == 94) @@ -2086,7 +2077,8 @@ yahoo_process_stealth(gc, pkt); break; case YAHOO_SERVICE_P2PFILEXFER: - yahoo_process_p2pfilexfer( gc, pkt ); // This case had no break and continued; thus keeping it this way. + /* This case had no break and continued; thus keeping it this way.*/ + yahoo_process_p2pfilexfer( gc, pkt ); case YAHOO_SERVICE_FILETRANSFER: yahoo_process_filetransfer(gc, pkt); break; @@ -2925,7 +2917,6 @@ return m; } - static GList *yahoo_blist_node_menu(GaimBlistNode *node) { if(GAIM_BLIST_NODE_IS_BUDDY(node)) { @@ -2935,7 +2926,6 @@ } } - static void yahoo_act_id(GaimConnection *gc, const char *entry) { struct yahoo_data *yd = gc->proto_data; @@ -2997,8 +2987,9 @@ yahoo_packet_hash_str(pkt, 97, "1"); yahoo_packet_hash_str(pkt, 14, msg2); - // If this message is to a user who is also Doodling with the local user, - // format the chat packet with the correct IMV information (thanks Yahoo!) + /* If this message is to a user who is also Doodling with the local user, + * format the chat packet with the correct IMV information (thanks Yahoo!) + */ wb = gaim_whiteboard_get_session(gc->account, (char*)who); if (wb) yahoo_packet_hash_str(pkt, 63, "doodle;11"); @@ -3166,7 +3157,6 @@ else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) yd->current_status = YAHOO_STATUS_AVAILABLE; - pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash_int(pkt, 10, yd->current_status); @@ -3190,7 +3180,6 @@ else if (!gaim_presence_is_available(gaim_account_get_presence(gaim_connection_get_account(gc)))) yahoo_packet_hash_str(pkt, 47, "1"); - yahoo_packet_send_and_free(pkt, yd); g_free(msg); @@ -3220,7 +3209,6 @@ gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type); - type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_BRB, _("Be Right Back"), TRUE); types = g_list_append(types, type); @@ -3257,7 +3245,6 @@ type = gaim_status_type_new(GAIM_STATUS_HIDDEN, YAHOO_STATUS_TYPE_INVISIBLE, _("Invisible"), TRUE); types = g_list_append(types, type); - return types; } @@ -3503,7 +3490,6 @@ static GaimPlugin *my_protocol = NULL; - static GaimCmdRet yahoogaim_cmd_chat_join(GaimConversation *conv, const char *cmd, char **args, char **error, void *data) @@ -3634,7 +3620,6 @@ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */ - "prpl-yahoo", /**< id */ "Yahoo", /**< name */ VERSION, /**< version */ @@ -3644,11 +3629,9 @@ N_("Yahoo Protocol Plugin"), NULL, /**< author */ GAIM_WEBSITE, /**< homepage */ - NULL, /**< load */ yahoo_unload_plugin, /**< unload */ NULL, /**< destroy */ - NULL, /**< ui_info */ &prpl_info, /**< extra_info */ NULL,
--- a/src/protocols/yahoo/yahoo.h Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo.h Wed Oct 12 04:02:46 2005 +0000 @@ -50,8 +50,6 @@ #define YAHOO_PICCKSUM_SETTING "picture_checksum" #define YAHOO_PICEXPIRE_SETTING "picture_expire" - - #define YAHOO_STATUS_TYPE_OFFLINE "offline" #define YAHOO_STATUS_TYPE_AVAILABLE "available" #define YAHOO_STATUS_TYPE_AVAILABLE_WM "available-wm" @@ -127,10 +125,8 @@ struct _YchtConn *ycht; }; - #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255) - /* sometimes i wish prpls could #include things from other prpls. then i could just * use the routines from libfaim and not have to admit to knowing how they work. */ #define yahoo_put16(buf, data) ( \ @@ -149,8 +145,6 @@ (((*((buf)+2))<< 8)&0x0000ff00) + \ (((*((buf)+3) )&0x000000ff))) - - /* util.c */ void yahoo_init_colorht(); void yahoo_dest_colorht();
--- a/src/protocols/yahoo/yahoo_auth.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_auth.c Wed Oct 12 04:02:46 2005 +0000 @@ -730,7 +730,7 @@ auth_function_t *ft; int remainder; - + hash = ((((hash ^ (hash >> 0x8)) >> 0x10) ^ hash) ^ (hash >> 0x8)) & 0xff; remainder = hash % divisor; @@ -821,8 +821,7 @@ int i; - /* Run through each bit. - */ + /* Run through each bit. */ for (i = 0; i < 32; i++) { @@ -876,7 +875,7 @@ unsigned int yahoo_auth_finalCountdown(unsigned int challenge, int divisor, int inner_loop, int outer_loop) { auth_function_t *ft; - + int remainder = challenge % divisor; ft = &main_function_list[inner_loop][remainder];
--- a/src/protocols/yahoo/yahoo_auth.h Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_auth.h Wed Oct 12 04:02:46 2005 +0000 @@ -4,7 +4,6 @@ * Copyright(c) 2003 Cerulean Studios */ - #ifndef _YAHOO_AUTH_H_ #define _YAHOO_AUTH_H_ @@ -31,5 +30,4 @@ unsigned char buffer[257]; }; - #endif /* _YAHOO_AUTH_H_ */
--- a/src/protocols/yahoo/yahoo_doodle.h Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_doodle.h Wed Oct 12 04:02:46 2005 +0000 @@ -120,5 +120,4 @@ void yahoo_doodle_draw_stroke( GaimWhiteboard *wb, GList *draw_list ); char *yahoo_doodle_build_draw_string( doodle_session *ds, GList *draw_list ); - #endif // _YAHOO_DOODLE_H_
--- a/src/protocols/yahoo/yahoo_filexfer.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.c Wed Oct 12 04:02:46 2005 +0000 @@ -32,8 +32,6 @@ #include "yahoo_filexfer.h" #include "yahoo_doodle.h" - - struct yahoo_xfer_data { gchar *host; gchar *path; @@ -108,8 +106,6 @@ account = gaim_connection_get_account(gc); yd = gc->proto_data; - - if (source < 0) { gaim_xfer_error(GAIM_XFER_RECEIVE, gaim_xfer_get_account(xfer), xfer->who, _("Unable to connect.")); @@ -120,13 +116,12 @@ xfer->fd = source; gaim_xfer_start(xfer, source, NULL, 0); - pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANSFER, YAHOO_STATUS_AVAILABLE, yd->session_id); size = g_strdup_printf("%" G_GSIZE_FORMAT, gaim_xfer_get_size(xfer)); filename = g_path_get_basename(gaim_xfer_get_local_filename(xfer)); encoded_filename = yahoo_string_encode(gc, filename, NULL); - + yahoo_packet_hash(pkt, "sssss", 0, gaim_connection_get_display_name(gc), 5, xfer->who, 14, "", 27, encoded_filename, 28, size); @@ -141,7 +136,8 @@ "Host: %s:%d\r\n" "Cookie: %s\r\n" "\r\n", - host, port, content_length + 4 + gaim_xfer_get_size(xfer), host, port, buf); + host, port, content_length + 4 + gaim_xfer_get_size(xfer), + host, port, buf); write(xfer->fd, post, strlen(post)); yahoo_packet_send_special(pkt, xfer->fd, 8); @@ -212,7 +208,6 @@ account = gaim_xfer_get_account(xfer); xfer_data = xfer->data; - if (xfer_data) yahoo_xfer_data_free(xfer_data); xfer->data = NULL; @@ -231,7 +226,6 @@ return 0; } - ssize_t yahoo_xfer_read(guchar **buffer, GaimXfer *xfer) { gchar buf[4096]; @@ -257,7 +251,6 @@ return -1; } - if (!xd->started) { xd->rxqueue = g_realloc(xd->rxqueue, len + xd->rxlen); memcpy(xd->rxqueue + xd->rxlen, buf, len); @@ -355,7 +348,7 @@ void yahoo_process_p2pfilexfer( GaimConnection *gc, struct yahoo_packet *pkt ) { GSList *l = pkt->hash; - + char *me = NULL; char *from = NULL; char *service = NULL; @@ -363,50 +356,49 @@ char *command = NULL; char *imv = NULL; char *unknown = NULL; - + // Get all the necessary values from this new packet while( l ) { struct yahoo_pair *pair = l->data; - + if( pair->key == 5 ) // Get who the packet is for me = pair->value; - + if( pair->key == 4 ) // Get who the packet is from from = pair->value; - + if( pair->key == 49 ) // Get the type of service service = pair->value; - + if( pair->key == 14 ) // Get the 'message' of the packet message = pair->value; - + if( pair->key == 13 ) // Get the command associated with this packet command = pair->value; - + if( pair->key == 63 ) // IMVironment name and version imv = pair->value; if( pair->key == 64 ) // Not sure, but it does vary with initialization of Doodle unknown = pair->value; // So, I'll keep it (for a little while atleast) - + l = l->next; } - + // If this packet is an IMVIRONMENT, handle it accordingly if( !strcmp( service, "IMVIRONMENT" ) ) { // Check for a Doodle packet and handle it accordingly if( !strcmp( imv, "doodle;11" ) ) yahoo_doodle_process( gc, me, from, command, message ); - + // If an IMVIRONMENT packet comes without a specific imviroment name if( !strcmp( imv, ";0" ) ) { // It is unfortunately time to close all IMVironments with remote client yahoo_doodle_command_got_shutdown( gc, from ); } - } } @@ -419,12 +411,9 @@ long expires = 0; GaimXfer *xfer; struct yahoo_xfer_data *xfer_data; - char *service = NULL; - char *filename = NULL; unsigned long filesize = 0L; - GSList *l; for (l = pkt->hash; l; l = l->next) { @@ -440,12 +429,10 @@ url = pair->value; if (pair->key == 38) expires = strtol(pair->value, NULL, 10); - if (pair->key == 27) filename = pair->value; if (pair->key == 28) filesize = atol(pair->value); - if (pair->key == 49) service = pair->value; } @@ -467,7 +454,6 @@ if (!url || !from) return; - /* Setup the Yahoo-specific file transfer data */ xfer_data = g_new0(struct yahoo_xfer_data, 1); xfer_data->gc = gc; @@ -531,7 +517,6 @@ xfer_data = g_new0(struct yahoo_xfer_data, 1); xfer_data->gc = gc; - /* Build the file transfer handle. */ xfer = gaim_xfer_new(gc->account, GAIM_XFER_SEND, who); xfer->data = xfer_data;
--- a/src/protocols/yahoo/yahoo_friend.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_friend.c Wed Oct 12 04:02:46 2005 +0000 @@ -242,7 +242,6 @@ yahoo_packet_send_and_free(pkt, yd); } - pkt = yahoo_packet_new(YAHOO_SERVICE_STEALTH_SESSION, YAHOO_STATUS_AVAILABLE, yd->session_id); yahoo_packet_hash(pkt, "ssss", @@ -253,4 +252,3 @@ if (pkt) yahoo_packet_send_and_free(pkt, yd); } -
--- a/src/protocols/yahoo/yahoo_packet.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_packet.c Wed Oct 12 04:02:46 2005 +0000 @@ -283,7 +283,7 @@ int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd) { int ret; - + ret = yahoo_packet_send(pkt, yd); yahoo_packet_free(pkt); return ret; @@ -306,7 +306,6 @@ memcpy(data + pos, "YMSG", 4); pos += 4; pos += yahoo_put16(data + pos, YAHOO_PROTO_VER); - pos += yahoo_put16(data + pos, 0x0000); pos += yahoo_put16(data + pos, pktlen + pad); pos += yahoo_put16(data + pos, pkt->service);
--- a/src/protocols/yahoo/yahoo_packet.h Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_packet.h Wed Oct 12 04:02:46 2005 +0000 @@ -118,7 +118,6 @@ #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) - struct yahoo_packet *yahoo_packet_new(enum yahoo_service service, enum yahoo_status status, int id); void yahoo_packet_hash(struct yahoo_packet *pkt, const char *fmt, ...);
--- a/src/protocols/yahoo/yahoo_picture.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_picture.c Wed Oct 12 04:02:46 2005 +0000 @@ -43,8 +43,6 @@ int checksum; }; - - void yahoo_fetch_picture_cb(void *user_data, const char *pic_data, size_t len) { struct yahoo_fetch_picture_data *d = user_data; @@ -120,7 +118,6 @@ } else if (who && send_icon_info) { yahoo_send_picture_info(gc, who); } - } void yahoo_process_picture_update(GaimConnection *gc, struct yahoo_packet *pkt) @@ -373,12 +370,10 @@ if (!d) return; - gc = d->gc; account = gaim_connection_get_account(gc); yd = gc->proto_data; - if (source < 0) { gaim_debug_error("yahoo", "Buddy icon upload failed, no file desc.\n"); yahoo_buddy_icon_upload_data_free(d); @@ -401,7 +396,6 @@ yahoo_packet_hash_str(pkt, 14, ""); content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); - buf = g_strdup_printf("Y=%s; T=%s", yd->cookie_y, yd->cookie_t); host = gaim_account_get_string(account, "xfer_host", YAHOO_XFER_HOST);
--- a/src/protocols/yahoo/yahoo_profile.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo_profile.c Wed Oct 12 04:02:46 2005 +0000 @@ -34,13 +34,11 @@ #include "yahoo.h" #include "yahoo_friend.h" - typedef struct { GaimConnection *gc; char *name; } YahooGetInfoData; - typedef enum profile_lang_id { XX, DA, DE, EL, EN, EN_GB, @@ -83,14 +81,12 @@ char *dummy; } profile_strings_node_t; - typedef enum profile_state { PROFILE_STATE_DEFAULT, PROFILE_STATE_NOT_FOUND, PROFILE_STATE_UNKNOWN_LANGUAGE } profile_state_t; - typedef struct { YahooGetInfoData *info_data; char *url_buffer; @@ -104,7 +100,6 @@ profile_state_t profile_state; } YahooGetInfoStepTwoData; - /* Strings to determine the profile "language" (more accurately "locale"). * Strings in this list must be in the original charset in the profile. * The "Last Updated" string is used, but sometimes is not sufficient to @@ -968,7 +963,6 @@ s = g_string_sized_new(strlen(url_buffer)); if (profile_state == PROFILE_STATE_DEFAULT) { - #if 0 /* extract their Yahoo! ID and put it in. Don't bother marking has_info as * true, since the Yahoo! ID will always be there */ @@ -979,7 +973,6 @@ #endif #if PHOTO_SUPPORT - /* Try to put the photo in there too, if there's one and is readable */ if (data && url_text && len != 0) { if (strstr(url_text, "400 Bad Request") @@ -994,7 +987,6 @@ g_string_append_printf(s, "<img id=\"%d\"><br>", id); } } - #endif /* PHOTO_SUPPORT */ /* extract their Email address and put it in */
--- a/src/protocols/yahoo/yahoochat.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoochat.c Wed Oct 12 04:02:46 2005 +0000 @@ -111,7 +111,6 @@ GString *members = NULL; GHashTable *components; - if (pkt->status == 2) return; /* XXX */ @@ -407,7 +406,6 @@ } } - if (room && yd->chat_name && gaim_utf8_strcasecmp(room, yd->chat_name)) yahoo_chat_leave(gc, room, gaim_connection_get_display_name(gc), FALSE); @@ -449,7 +447,6 @@ yahoo_chat_add_users(GAIM_CONV_CHAT(c), members); } - if (account->deny && c) { GaimConversationUiOps *ops = gaim_conversation_get_ui_ops(c); for (l = account->deny; l != NULL; l = l->next) { @@ -486,7 +483,6 @@ who = pair->value; } - if (who && room) { GaimConversation *c = gaim_find_chat(gc, YAHOO_CHAT_ID); if (c && !gaim_utf8_strcasecmp(gaim_conversation_get_name(c), room)) @@ -527,7 +523,6 @@ } } - c = gaim_find_chat(gc, YAHOO_CHAT_ID); if (!who || !c) { if (room) @@ -563,7 +558,6 @@ char *msg = NULL; char *who = NULL; - for (l = pkt->hash; l; l = l->next) { struct yahoo_pair *pair = l->data; @@ -615,7 +609,6 @@ _("Maybe they're not in a chat?")); } - /* * Functions dealing with conferences * I think conference names are always ascii. @@ -637,7 +630,6 @@ } yahoo_packet_hash_str(pkt, 57, room); - yahoo_packet_send_and_free(pkt, yd); } @@ -653,7 +645,6 @@ msg = yahoo_html_to_codes(what); msg2 = yahoo_string_encode(gc, msg, &utf8); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFMSG, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash_str(pkt, 1, dn); @@ -682,7 +673,6 @@ if (members) memarr = g_strsplit(members, "\n", 0); - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGON, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash(pkt, "sss", 1, dn, 3, dn, 57, room); @@ -749,10 +739,8 @@ eroom = yahoo_string_encode(gc, room, &utf8); pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); - yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ - yahoo_packet_send_and_free(pkt, yd); yd->in_chat = 0; @@ -766,7 +754,7 @@ if (!logout) return; - + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATLOGOUT, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash_str(pkt, 1, dn); @@ -808,7 +796,6 @@ if (*c != '\0' && !g_ascii_strncasecmp(c, "/me ", 4)) { memmove(c, c + 4, len - 3); - return TRUE; } @@ -867,7 +854,6 @@ if (yd->wm) { g_return_if_fail(yd->ycht != NULL); - ycht_chat_join(yd->ycht, room); return; } @@ -893,7 +879,6 @@ if (yd->wm) { g_return_if_fail(yd->ycht != NULL); - ycht_chat_send_invite(yd->ycht, room, buddy, msg); return; } @@ -901,7 +886,7 @@ room2 = yahoo_string_encode(gc, room, &utf8); if (msg) msg2 = yahoo_string_encode(gc, msg, NULL); - + pkt = yahoo_packet_new(YAHOO_SERVICE_CHATADDINVITE, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash(pkt, "sssss", 1, dn, 118, buddy, 104, room2, 117, (msg2?msg2:""), 129, "0"); yahoo_packet_send_and_free(pkt, yd); @@ -919,7 +904,6 @@ if (yd->wm) { g_return_if_fail(yd->ycht != NULL); - ycht_chat_goto_user(yd->ycht, name); return; } @@ -944,7 +928,6 @@ if (!yd) return; - c = gaim_find_chat(gc, id); if (!c) return; @@ -1039,7 +1022,6 @@ members = g_hash_table_lookup(data, "members"); - if ((type = g_hash_table_lookup(data, "type")) && !strcmp(type, "Conference")) { id = yd->conf_id++; c = serv_got_joined_chat(gc, id, room); @@ -1076,7 +1058,6 @@ } } - struct yahoo_roomlist { int fd; int inpa; @@ -1089,7 +1070,6 @@ GaimRoomlistRoom *cat; GaimRoomlistRoom *ucat; GMarkupParseContext *parse; - }; static void yahoo_roomlist_destroy(struct yahoo_roomlist *yrl) @@ -1134,7 +1114,6 @@ struct yahoo_chatxml_state *s; s = g_new0(struct yahoo_chatxml_state, 1); - s->list = list; s->yrl = yrl; s->q = g_queue_new(); @@ -1154,9 +1133,10 @@ g_free(s); } -static void yahoo_chatlist_start_element(GMarkupParseContext *context, const gchar *ename, - const gchar **anames, const gchar **avalues, - gpointer user_data, GError **error) +static void yahoo_chatlist_start_element(GMarkupParseContext *context, + const gchar *ename, const gchar **anames, + const gchar **avalues, gpointer user_data, + GError **error) { struct yahoo_chatxml_state *s = user_data; GaimRoomlist *list = s->list; @@ -1220,10 +1200,8 @@ s->room.webcams += lob->webcams = strtol(avalues[i], NULL, 10); } } - g_queue_push_head(s->q, lob); } - } static void yahoo_chatlist_end_element(GMarkupParseContext *context, const gchar *ename, @@ -1267,9 +1245,7 @@ g_free(name); g_free(lob); } - } - } static GMarkupParser parser = { @@ -1310,7 +1286,6 @@ return; } - yrl->rxqueue = g_realloc(yrl->rxqueue, len + yrl->rxlen); memcpy(yrl->rxqueue + yrl->rxlen, buf, len); yrl->rxlen += len;
--- a/src/protocols/yahoo/ycht.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/ycht.c Wed Oct 12 04:02:46 2005 +0000 @@ -99,7 +99,6 @@ *tmp = '\0'; } - if (g_list_length(pkt->data) > 5) new_room = TRUE; @@ -111,7 +110,6 @@ c = gaim_find_chat(gc, YAHOO_CHAT_ID); } - if (topic) gaim_conv_chat_set_topic(GAIM_CONV_CHAT(c), NULL, topic);