comparison src/protocols/yahoo/yahoo.c @ 8375:1556970088d4

[gaim-migrate @ 9102] quoth marv: " I like "What You Get Is What You Get" better. This fixes a problem where yahoo was sending < and > to the core when it wasn't html, and so gtkimhtml wasn't displaying part of the message. It's fixed by making the prpl escape it first. While I was add it, it made it display "Buzz!!" when someone buzzes you, instead of it saying that they said <ding>. Note that the official client uses red letters, all caps, and 3 !'s, and makes the window shake, so what we do is pretty mild. I also fixed a compile warning." committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 01 Mar 2004 05:13:45 +0000
parents 1f56ea865926
children ae15e717ca75
comparison
equal deleted inserted replaced
8374:e7463be62fb1 8375:1556970088d4
749 continue; 749 continue;
750 } 750 }
751 751
752 m = yahoo_string_decode(gc, im->msg, im->utf8); 752 m = yahoo_string_decode(gc, im->msg, im->utf8);
753 gaim_str_strip_cr(m); 753 gaim_str_strip_cr(m);
754
755 if (!strcmp(m, "<ding>")) {
756 GaimConversation *c = gaim_conversation_new(GAIM_CONV_IM,
757 gaim_connection_get_account(gc), im->from);
758 gaim_conv_im_write(GAIM_CONV_IM(c), "", _("Buzz!!"), GAIM_MESSAGE_NICK|GAIM_MESSAGE_RECV,
759 im->time);
760 g_free(m);
761 g_free(im);
762 continue;
763 }
764
754 m2 = yahoo_codes_to_html(m); 765 m2 = yahoo_codes_to_html(m);
755 g_free(m); 766 g_free(m);
756 serv_got_im(gc, im->from, m2, 0, im->time); 767 serv_got_im(gc, im->from, m2, 0, im->time);
757 g_free(m2); 768 g_free(m2);
758 g_free(im); 769 g_free(im);
1134 1145
1135 unsigned char digest1[20]; 1146 unsigned char digest1[20];
1136 unsigned char digest2[20]; 1147 unsigned char digest2[20];
1137 unsigned char comparison_src[20]; 1148 unsigned char comparison_src[20];
1138 unsigned char magic_key_char[4]; 1149 unsigned char magic_key_char[4];
1139 unsigned char *magic_ptr; 1150 const unsigned char *magic_ptr;
1140 1151
1141 unsigned int magic[64]; 1152 unsigned int magic[64];
1142 unsigned int magic_work = 0; 1153 unsigned int magic_work = 0;
1143 unsigned int magic_4 = 0; 1154 unsigned int magic_4 = 0;
1144 1155
1166 * Magic: Phase 1. Generate what seems to be a 30 byte value (could change if base64 1177 * Magic: Phase 1. Generate what seems to be a 30 byte value (could change if base64
1167 * ends up differently? I don't remember and I'm tired, so use a 64 byte buffer. 1178 * ends up differently? I don't remember and I'm tired, so use a 64 byte buffer.
1168 */ 1179 */
1169 1180
1170 magic_ptr = seed; 1181 magic_ptr = seed;
1171 1182
1172 while (*magic_ptr != (int)NULL) { 1183 while (*magic_ptr != (int)NULL) {
1173 char *loc; 1184 char *loc;
1174 1185
1175 /* Ignore parentheses. 1186 /* Ignore parentheses.
1176 */ 1187 */