cpw.qulogic.msn: df907524: On MSN, only notify the user of a Nudge ...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Jun 23 01:56:38 EDT 2008
-----------------------------------------------------------------
Revision: df907524b938456b63be195f20232872a1543a64
Ancestor: 197e49f9518c8484730609cd64454f5ff9d0090b
Author: qulogic at pidgin.im
Date: 2008-06-23T01:14:02
Branch: im.pidgin.cpw.qulogic.msn
URL: http://d.pidgin.im/viewmtn/revision/info/df907524b938456b63be195f20232872a1543a64
Modified files:
libpurple/protocols/msn/switchboard.c
ChangeLog:
On MSN, only notify the user of a Nudge when the ID of the datacast
message is '1'.
References #3939.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/switchboard.c 4657e4e2b86238c89b9c114490d4064d05fe8c84
+++ libpurple/protocols/msn/switchboard.c 6620958d1eb5640e6cfda4f8f074da91ea4a4c18
@@ -960,17 +960,40 @@ static void
}
static void
-nudge_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
+datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
{
- MsnSwitchBoard *swboard;
- PurpleAccount *account;
- const char *user;
+ GHashTable *body;
+ const char *id;
+ body = msn_message_get_hashtable_from_body(msg);
- swboard = cmdproc->data;
- account = cmdproc->session->account;
- user = msg->remote_user;
+ id = g_hash_table_lookup(body, "ID");
- serv_got_attention(account->gc, user, MSN_NUDGE);
+ if (!strcmp(id, "1")) {
+ /* Nudge */
+ MsnSwitchBoard *swboard;
+ PurpleAccount *account;
+ const char *user;
+
+ swboard = cmdproc->data;
+ account = cmdproc->session->account;
+ user = msg->remote_user;
+
+ serv_got_attention(account->gc, user, MSN_NUDGE);
+
+ } else if (!strcmp(id, "2")) {
+ /* Wink */
+
+ } else if (!strcmp(id, "3")) {
+ /* Voiceclip */
+
+ } else if (!strcmp(id, "4")) {
+ /* Action */
+
+ } else {
+ purple_debug_warning("msn", "Got unknown datacast with ID %s.\n", id);
+ }
+
+ g_hash_table_destroy(body);
}
/**************************************************************************
@@ -1309,7 +1332,7 @@ msn_switchboard_init(void)
msn_table_add_msg_type(cbs_table, "text/x-mms-animemoticon",
msn_emoticon_msg);
msn_table_add_msg_type(cbs_table, "text/x-msnmsgr-datacast",
- nudge_msg);
+ datacast_msg);
#if 0
msn_table_add_msg_type(cbs_table, "text/x-msmmsginvite",
msn_invite_msg);
More information about the Commits
mailing list