comparison libpurple/protocols/yahoo/yahoo.c @ 19444:a1cf5440d945

Set the custom status message for yahoo buddies correctly at login time. Fixes #2754.
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 26 Aug 2007 06:55:21 +0000
parents 35ae010cc037
children ca45543c11a3
comparison
equal deleted inserted replaced
19430:0104035fd510 19444:a1cf5440d945
236 } 236 }
237 break; 237 break;
238 case 8: /* how many online buddies we have */ 238 case 8: /* how many online buddies we have */
239 break; 239 break;
240 case 7: /* the current buddy */ 240 case 7: /* the current buddy */
241 if (name && f) /* update the previous buddy before changing the variables */ 241 /* update the previous buddy before changing the variables */
242 yahoo_update_status(gc, name, f); 242 if (f) {
243 name = pair->value; 243 if (message)
244 if (name && g_utf8_validate(name, -1, NULL)) 244 yahoo_friend_set_status_message(f, yahoo_string_decode(gc, message, unicode));
245 if (name)
246 yahoo_update_status(gc, name, f);
247 }
248 name = message = NULL;
249 f = NULL;
250 if (pair->value && g_utf8_validate(pair->value, -1, NULL)) {
251 name = pair->value;
245 f = yahoo_friend_find_or_new(gc, name); 252 f = yahoo_friend_find_or_new(gc, name);
246 else {
247 f = NULL;
248 name = NULL;
249 } 253 }
250 break; 254 break;
251 case 10: /* state */ 255 case 10: /* state */
252 if (!f) 256 if (!f)
253 break; 257 break;
777 PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, from, gc->account); 781 PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, from, gc->account);
778 char *buf = g_strdup_printf(_("%s has sent you a webcam invite, which is not yet supported."), from); 782 char *buf = g_strdup_printf(_("%s has sent you a webcam invite, which is not yet supported."), from);
779 purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, time(NULL)); 783 purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, time(NULL));
780 g_free(buf); 784 g_free(buf);
781 } 785 }
782 786
783 } 787 }
784 788
785 789
786 struct _yahoo_im { 790 struct _yahoo_im {
787 char *from; 791 char *from;