# HG changeset patch # User Richard Laager # Date 1230934629 0 # Node ID a4a17fe8016078f0301cc32f54e818135ccea4c6 # Parent 138c729f8c9abe9192778bdb6942910610e19461# Parent 75ecd41a64ba60a13eeb8c1f198d6e5039f02514 explicit merge of 'f7807039eeef499a403d638cbcb94060a1d33eea' and '59d53e7606e3c4bd860b9fd6c786f61acf61476b' diff -r 138c729f8c9a -r a4a17fe80160 libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Fri Jan 02 22:11:08 2009 +0000 +++ b/libpurple/protocols/myspace/myspace.c Fri Jan 02 22:17:09 2009 +0000 @@ -1179,7 +1179,6 @@ NULL); /* Request MySpace info about ourself. */ - purple_debug_error("MARK", "Fetching info about ourself\n"); msim_send(session, "persist", MSIM_TYPE_INTEGER, 1, "sesskey", MSIM_TYPE_INTEGER, session->sesskey, @@ -2558,7 +2557,7 @@ MsimMessage *msg_persist; MsimMessage *body; const char *name, *gname; - + GList *blocklist_updates; session = (MsimSession *)gc->proto_data; name = purple_buddy_get_name(buddy); @@ -2614,6 +2613,27 @@ return; } msim_msg_free(msg_persist); + + /* Remove the buddy from our block list and add them to our accept list, I think */ + blocklist_updates = NULL; + blocklist_updates = g_list_prepend(blocklist_updates, "a+"); + blocklist_updates = g_list_prepend(blocklist_updates, ""); + blocklist_updates = g_list_prepend(blocklist_updates, "b-"); + blocklist_updates = g_list_prepend(blocklist_updates, ""); + blocklist_updates = g_list_reverse(blocklist_updates); + + msg = msim_msg_new( + "blocklist", MSIM_TYPE_BOOLEAN, TRUE, + "sesskey", MSIM_TYPE_INTEGER, session->sesskey, + /* TODO: MsimMessage lists. Currently isn't replaced in lists. */ + /* "idlist", MSIM_TYPE_STRING, g_strdup("a-||b-|"), */ + "idlist", MSIM_TYPE_LIST, blocklist_updates, + NULL); + + if (!msim_postprocess_outgoing(session, msg, buddy->name, "idlist", NULL)) + purple_debug_error("myspace", "blocklist command failed\n"); + + msim_msg_free(msg); } /** @@ -2626,8 +2646,8 @@ MsimMessage *delbuddy_msg; MsimMessage *persist_msg; MsimMessage *blocklist_msg; + const char *name; GList *blocklist_updates; - const char *name; session = (MsimSession *)gc->proto_data; name = purple_buddy_get_name(buddy); @@ -2664,6 +2684,7 @@ } msim_msg_free(persist_msg); + /* Remove the buddy from our block list(huh?) and our accept list */ blocklist_updates = NULL; blocklist_updates = g_list_prepend(blocklist_updates, "a-"); blocklist_updates = g_list_prepend(blocklist_updates, "");