# HG changeset patch # User Sadrul Habib Chowdhury # Date 1174967502 0 # Node ID 9214184b9d10d1afc6e323b7d05711cb4fc6a0cb # Parent 92fa7d6e75b00dab9dcf509bdde42629c1a16044# Parent 5c88d2887cc1648f2d6a7217f4c3421bfeb7268a merge of '58f408c6a0eb5c8b0411d8ac4754a14bef441062' and 'fba53203d9fe0ebd98157bdc6c7faeb2b149908b' diff -r 92fa7d6e75b0 -r 9214184b9d10 COPYRIGHT --- a/COPYRIGHT Tue Mar 27 03:50:04 2007 +0000 +++ b/COPYRIGHT Tue Mar 27 03:51:42 2007 +0000 @@ -357,6 +357,7 @@ Andrew Wellington Adam Wendt Dave West +Zac West Daniel Westermann-Clark Andrew Whewell Simon Wilkinson diff -r 92fa7d6e75b0 -r 9214184b9d10 libpurple/conversation.h --- a/libpurple/conversation.h Tue Mar 27 03:50:04 2007 +0000 +++ b/libpurple/conversation.h Tue Mar 27 03:51:42 2007 +0000 @@ -115,7 +115,8 @@ PURPLE_MESSAGE_DELAYED = 0x0400, /**< Delayed message. */ PURPLE_MESSAGE_RAW = 0x0800, /**< "Raw" message - don't apply formatting */ - PURPLE_MESSAGE_IMAGES = 0x1000 /**< Message contains images */ + PURPLE_MESSAGE_IMAGES = 0x1000, /**< Message contains images */ + PURPLE_MESSAGE_NOTIFY = 0x2000 /**< Message is a notification */ } PurpleMessageFlags; diff -r 92fa7d6e75b0 -r 9214184b9d10 libpurple/protocols/msn/switchboard.c --- a/libpurple/protocols/msn/switchboard.c Tue Mar 27 03:50:04 2007 +0000 +++ b/libpurple/protocols/msn/switchboard.c Tue Mar 27 03:51:42 2007 +0000 @@ -955,7 +955,7 @@ str = g_strdup_printf(_("%s just sent you a Nudge!"), username); g_free(username); - msn_switchboard_report_user(swboard, PURPLE_MESSAGE_SYSTEM, str); + msn_switchboard_report_user(swboard, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, str); g_free(str); } diff -r 92fa7d6e75b0 -r 9214184b9d10 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Tue Mar 27 03:50:04 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Tue Mar 27 03:51:42 2007 +0000 @@ -859,10 +859,25 @@ purple_util_chrreplace(m, '\r', '\n'); if (!strcmp(m, "")) { - PurpleConversation *c = purple_conversation_new(PURPLE_CONV_TYPE_IM, - purple_connection_get_account(gc), im->from); - purple_conv_im_write(PURPLE_CONV_IM(c), "", _("Buzz!!"), PURPLE_MESSAGE_NICK|PURPLE_MESSAGE_RECV, - im->time); + PurpleBuddy *buddy; + PurpleAccount *account; + PurpleConversation *c; + char *username, *str; + + account = purple_connection_get_account(gc); + c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, im->from); + + if ((buddy = purple_find_buddy(account, im->from)) != NULL) + username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); + else + username = g_markup_escape_text(im->from, -1); + + str = g_strdup_printf(_("%s just sent you a Buzz!"), username); + + purple_conversation_write(c, NULL, str, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, im->time); + + g_free(username); + g_free(str); g_free(m); g_free(im); continue; @@ -3737,7 +3752,7 @@ purple_debug(PURPLE_DEBUG_INFO, "yahoo", "Sending on account %s to buddy %s.\n", username, c->name); purple_conv_im_send(PURPLE_CONV_IM(c), ""); - purple_conv_im_write(PURPLE_CONV_IM(c), "", _("Buzz!!"), PURPLE_MESSAGE_NICK|PURPLE_MESSAGE_SEND, time(NULL)); + purple_conversation_write(c, NULL, _("You have just sent a Buzz!"), PURPLE_MESSAGE_SYSTEM, time(NULL)); return PURPLE_CMD_RET_OK; }