comparison libpurple/protocols/oscar/oscar.c @ 30011:855620e59e0e

Minor whitespace changes
author Mark Doliner <mark@kingant.net>
date Thu, 18 Mar 2010 08:08:43 +0000
parents 80933c92c080
children a7875e67ad9c
comparison
equal deleted inserted replaced
30010:80933c92c080 30011:855620e59e0e
478 } else { 478 } else {
479 /* Unknown, hope for valid UTF-8... */ 479 /* Unknown, hope for valid UTF-8... */
480 charsetstr1 = "UTF-8"; 480 charsetstr1 = "UTF-8";
481 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); 481 charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
482 } 482 }
483 483
484 purple_debug_info("oscar", "Parsing IM part, charset=0x%04hx, charsubset=0x%04hx, datalen=%" G_GSIZE_FORMAT ", choice1=%s, choice2=%s, choice3=%s\n", 484 purple_debug_info("oscar", "Parsing IM part, charset=0x%04hx, charsubset=0x%04hx, datalen=%" G_GSIZE_FORMAT ", choice1=%s, choice2=%s, choice3=%s\n",
485 charset, charsubset, datalen, charsetstr1, charsetstr2, (charsetstr3 ? charsetstr3 : "")); 485 charset, charsubset, datalen, charsetstr1, charsetstr2, (charsetstr3 ? charsetstr3 : ""));
486 486
487 ret = purple_plugin_oscar_convert_to_utf8(data, datalen, charsetstr1, FALSE); 487 ret = purple_plugin_oscar_convert_to_utf8(data, datalen, charsetstr1, FALSE);
488 if (ret == NULL) { 488 if (ret == NULL) {
3329 PurpleNotifyUserInfo *user_info; 3329 PurpleNotifyUserInfo *user_info;
3330 3330
3331 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */ 3331 /* Split at (carriage return/newline)'s, then rejoin later with BRs between. */
3332 statusmsg = oscar_icqstatus(state); 3332 statusmsg = oscar_icqstatus(state);
3333 splitmsg = g_strsplit(msg, "\r\n", 0); 3333 splitmsg = g_strsplit(msg, "\r\n", 0);
3334 3334
3335 user_info = purple_notify_user_info_new(); 3335 user_info = purple_notify_user_info_new();
3336 3336
3337 purple_notify_user_info_add_pair(user_info, _("UIN"), who); 3337 purple_notify_user_info_add_pair(user_info, _("UIN"), who);
3338 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg); 3338 purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg);
3339 purple_notify_user_info_add_section_break(user_info); 3339 purple_notify_user_info_add_section_break(user_info);
3340 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg)); 3340 purple_notify_user_info_add_pair(user_info, NULL, g_strjoinv("<BR>", splitmsg));
3341 3341
4756 } 4756 }
4757 4757
4758 img = purple_buddy_icons_find_account_icon(account); 4758 img = purple_buddy_icons_find_account_icon(account);
4759 if (img) { 4759 if (img) {
4760 gconstpointer data = purple_imgstore_get_data(img); 4760 gconstpointer data = purple_imgstore_get_data(img);
4761 args.iconlen = purple_imgstore_get_size(img); 4761 args.iconlen = purple_imgstore_get_size(img);
4762 args.iconsum = aimutil_iconsum(data, args.iconlen); 4762 args.iconsum = aimutil_iconsum(data, args.iconlen);
4763 args.iconstamp = purple_buddy_icons_get_account_icon_timestamp(account); 4763 args.iconstamp = purple_buddy_icons_get_account_icon_timestamp(account);
4764 4764
4765 if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time)) { 4765 if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time)) {
4766 bi->ico_informed = FALSE; 4766 bi->ico_informed = FALSE;
4767 bi->ico_sent = FALSE; 4767 bi->ico_sent = FALSE;
5366 aim_ssi_cleanlist(od); 5366 aim_ssi_cleanlist(od);
5367 5367
5368 { /* If not in server list then prune from local list */ 5368 { /* If not in server list then prune from local list */
5369 GSList *cur, *next; 5369 GSList *cur, *next;
5370 GSList *buddies = purple_find_buddies(account, NULL); 5370 GSList *buddies = purple_find_buddies(account, NULL);
5371 5371
5372 /* Buddies */ 5372 /* Buddies */
5373 cur = NULL; 5373 cur = NULL;
5374 5374
5375 while(buddies) { 5375 while(buddies) {
5376 PurpleGroup *g; 5376 PurpleGroup *g;
6387 _("Free For Chat"), TRUE, is_icq, FALSE, 6387 _("Free For Chat"), TRUE, is_icq, FALSE,
6388 "message", _("Message"), 6388 "message", _("Message"),
6389 purple_value_new(PURPLE_TYPE_STRING), NULL); 6389 purple_value_new(PURPLE_TYPE_STRING), NULL);
6390 6390
6391 status_types = g_list_prepend(status_types, type); 6391 status_types = g_list_prepend(status_types, type);
6392 6392
6393 type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE, 6393 type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
6394 OSCAR_STATUS_ID_EVIL, 6394 OSCAR_STATUS_ID_EVIL,
6395 _("Evil"), TRUE, is_icq, FALSE, 6395 _("Evil"), TRUE, is_icq, FALSE,
6396 "message", _("Message"), 6396 "message", _("Message"),
6397 purple_value_new(PURPLE_TYPE_STRING), NULL); 6397 purple_value_new(PURPLE_TYPE_STRING), NULL);
6649 6649
6650 /* OSCAR_DISCONNECT_LOCAL_CLOSED doesn't write anything to the convo 6650 /* OSCAR_DISCONNECT_LOCAL_CLOSED doesn't write anything to the convo
6651 * window. Let the user know that we canceled the Direct IM. */ 6651 * window. Let the user know that we canceled the Direct IM. */
6652 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name); 6652 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
6653 purple_conversation_write(conv, NULL, _("You closed the connection."), 6653 purple_conversation_write(conv, NULL, _("You closed the connection."),
6654 PURPLE_MESSAGE_SYSTEM, time(NULL)); 6654 PURPLE_MESSAGE_SYSTEM, time(NULL));
6655 } 6655 }
6656 } 6656 }
6657 6657
6658 static void oscar_get_icqxstatusmsg (PurpleBlistNode *node, gpointer ignore) 6658 static void oscar_get_icqxstatusmsg(PurpleBlistNode *node, gpointer ignore)
6659 { 6659 {
6660 PurpleBuddy *buddy; 6660 PurpleBuddy *buddy;
6661 PurpleConnection *gc; 6661 PurpleConnection *gc;
6662 PurpleAccount *account; 6662 PurpleAccount *account;
6663 6663
6664
6665 g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node)); 6664 g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node));
6666 6665
6667 buddy = (PurpleBuddy *)node; 6666 buddy = (PurpleBuddy *)node;
6668 gc = purple_account_get_connection(buddy->account); 6667 gc = purple_account_get_connection(buddy->account);
6669 account = purple_connection_get_account(gc); 6668 account = purple_connection_get_account(gc);
6670 purple_debug_info("oscar", "Manual X-Status Get From %s to %s:\n", purple_buddy_get_name(buddy), account->username); 6669 purple_debug_info("oscar", "Manual X-Status Get From %s to %s:\n", purple_buddy_get_name(buddy), account->username);
6671 6670
6672 icq_im_xstatus_request(gc->proto_data, purple_buddy_get_name(buddy)); 6671 icq_im_xstatus_request(gc->proto_data, purple_buddy_get_name(buddy));
6673 } 6672 }
6674 6673
6675 static void 6674 static void