Mercurial > pidgin
comparison src/protocols/yahoo/yahoo.c @ 3493:4b204c262376
[gaim-migrate @ 3553]
Rob committed some bug fixes to gtk1-stable, but not to HEAD. now his computer
is acting up again, so i'm making the corresponding commits to HEAD. this
should help with yahoo i18n, segfaults on jabber, a problem in gaimrc, and
word wrapping on new mail notification.
Modified Files:
ChangeLog src/gaim.h src/gaimrc.c src/prpl.c
src/protocols/msn/msn.c src/protocols/yahoo/yahoo.c
----------------------------------------------------------------------
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 10 Sep 2002 15:31:34 +0000 |
parents | 79e0d2f8ad2b |
children | 8de976fe3ed8 |
comparison
equal
deleted
inserted
replaced
3492:3b9b5e06c2e0 | 3493:4b204c262376 |
---|---|
589 continue; | 589 continue; |
590 } | 590 } |
591 msg[j++] = m[i]; | 591 msg[j++] = m[i]; |
592 } | 592 } |
593 msg[j] = 0; | 593 msg[j] = 0; |
594 serv_got_im(gc, from, msg, 0, tm, -1); | 594 serv_got_im(gc, from, utf8_to_str(msg), 0, tm, -1); |
595 } else if (pkt->status == 2) { | 595 } else if (pkt->status == 2) { |
596 do_error_dialog(_("Your Yahoo! message did not get sent."), NULL, GAIM_ERROR); | 596 do_error_dialog(_("Your Yahoo! message did not get sent."), NULL, GAIM_ERROR); |
597 } | 597 } |
598 } | 598 } |
599 | 599 |
968 | 968 |
969 static void yahoo_login(struct aim_user *user) { | 969 static void yahoo_login(struct aim_user *user) { |
970 struct gaim_connection *gc = new_gaim_conn(user); | 970 struct gaim_connection *gc = new_gaim_conn(user); |
971 struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); | 971 struct yahoo_data *yd = gc->proto_data = g_new0(struct yahoo_data, 1); |
972 | 972 |
973 g_snprintf(gc->username, sizeof(gc->username), "%s", g_strstrip(gc->username)); | |
973 set_login_progress(gc, 1, "Connecting"); | 974 set_login_progress(gc, 1, "Connecting"); |
974 | 975 |
975 yd->fd = -1; | 976 yd->fd = -1; |
976 yd->hash = g_hash_table_new(g_str_hash, g_str_equal); | 977 yd->hash = g_hash_table_new(g_str_hash, g_str_equal); |
977 yd->games = g_hash_table_new(g_str_hash, g_str_equal); | 978 yd->games = g_hash_table_new(g_str_hash, g_str_equal); |
1176 | 1177 |
1177 static int yahoo_send_im(struct gaim_connection *gc, char *who, char *what, int len, int flags) | 1178 static int yahoo_send_im(struct gaim_connection *gc, char *who, char *what, int len, int flags) |
1178 { | 1179 { |
1179 struct yahoo_data *yd = gc->proto_data; | 1180 struct yahoo_data *yd = gc->proto_data; |
1180 struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE, 0); | 1181 struct yahoo_packet *pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YAHOO_STATUS_OFFLINE, 0); |
1182 char *msg = str_to_utf8(what); | |
1181 | 1183 |
1182 yahoo_packet_hash(pkt, 1, gc->displayname); | 1184 yahoo_packet_hash(pkt, 1, gc->displayname); |
1183 yahoo_packet_hash(pkt, 5, who); | 1185 yahoo_packet_hash(pkt, 5, who); |
1184 yahoo_packet_hash(pkt, 14, what); | 1186 yahoo_packet_hash(pkt, 14, msg); |
1185 | 1187 |
1186 yahoo_send_packet(yd, pkt); | 1188 yahoo_send_packet(yd, pkt); |
1187 | 1189 |
1188 yahoo_packet_free(pkt); | 1190 yahoo_packet_free(pkt); |
1189 | 1191 |
1190 return 1; | 1192 return 1; |
1191 } | 1193 } |
1192 | 1194 |
1193 int yahoo_send_typing(struct gaim_connection *gc, char *who, int typ) | 1195 int yahoo_send_typing(struct gaim_connection *gc, char *who, int typ) |
1194 { | 1196 { |