Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision eb54f56f35b611d03913cde2244e7eab431dc271)
+++ protocols/msn/sb.c	(revision c59f594c9a11a427997a1416900372dcef75818d)
@@ -629,7 +629,10 @@
 		/* If the person is offline, send an offline message instead,
 		   and don't report an error. */
+		/* TODO: Support for OIMs that works. (#874) */
+		/*
 		if( num == 217 )
 			msn_soap_oim_send_queue( ic, &sb->msgq );
 		else
+		*/
 			imcb_error( ic, "Error reported by switchboard server: %s", err->text );
 		
Index: protocols/msn/soap.c
===================================================================
--- protocols/msn/soap.c	(revision eb54f56f35b611d03913cde2244e7eab431dc271)
+++ protocols/msn/soap.c	(revision c59f594c9a11a427997a1416900372dcef75818d)
@@ -474,148 +474,4 @@
 
 
-/* oim_send: Sending offline messages */
-
-struct msn_soap_oim_send_data
-{
-	char *to;
-	char *msg;
-	int number;
-	msn_soap_result_t need_retry;
-};
-
-static int msn_soap_oim_build_request( struct msn_soap_req_data *soap_req )
-{
-	struct msn_soap_oim_send_data *oim = soap_req->data;
-	struct im_connection *ic = soap_req->ic;
-	struct msn_data *md = ic->proto_data;
-	char *display_name_b64;
-	
-	display_name_b64 = tobase64( set_getstr( &ic->acc->set, "display_name" ) );
-	
-	soap_req->url = g_strdup( SOAP_OIM_SEND_URL );
-	soap_req->action = g_strdup( SOAP_OIM_SEND_ACTION );
-	soap_req->payload = g_markup_printf_escaped( SOAP_OIM_SEND_PAYLOAD,
-		ic->acc->user, display_name_b64, MSNP_VER, MSNP_BUILD,
-		oim->to, md->tokens[2],
-		MSNP11_PROD_ID, md->lock_key ? md->lock_key : "",
-		oim->number, oim->number, oim->msg );
-	
-	g_free( display_name_b64 );
-	oim->need_retry = MSN_SOAP_OK;
-	
-	return MSN_SOAP_OK;
-}
-
-static xt_status msn_soap_oim_reauth( struct xt_node *node, gpointer data )
-{
-	struct msn_soap_req_data *soap_req = data;
-	struct msn_soap_oim_send_data *oim = soap_req->data;
-	struct im_connection *ic = soap_req->ic;
-	struct msn_data *md = ic->proto_data;
-	struct xt_node *c;
-	
-	if( ( c = xt_find_node( node->children, "LockKeyChallenge" ) ) && c->text_len > 0 )
-	{
-		g_free( md->lock_key );
-		md->lock_key = msn_p11_challenge( c->text );
-		oim->need_retry = MSN_SOAP_RETRY;
-	}
-	if( xt_find_node( node->children, "RequiredAuthPolicy" ) )
-	{
-		oim->need_retry = MSN_SOAP_REAUTH;
-	}
-	
-	return XT_HANDLED;
-}
-
-static const struct xt_handler_entry msn_soap_oim_send_parser[] = {
-	{ "detail", "soap:Fault", msn_soap_oim_reauth },
-	{ NULL,     NULL,         NULL                }
-};
-
-static int msn_soap_oim_handle_response( struct msn_soap_req_data *soap_req )
-{
-	struct msn_soap_oim_send_data *oim = soap_req->data;
-	
-	if( soap_req->http_req->status_code == 500 && oim->need_retry && soap_req->ttl > 0 )
-	{
-		return oim->need_retry;
-	}
-	else if( soap_req->http_req->status_code == 200 )
-	{
-		/* Noise..
-		imcb_log( soap_req->ic, "Offline message successfully delivered to %s", oim->to );
-		*/
-		return MSN_SOAP_OK;
-	}
-	else
-	{
-		char *dec = frombase64( oim->msg );
-		imcb_log( soap_req->ic, "Failed to deliver offline message to %s:\n%s", oim->to, dec );
-		g_free( dec );
-		return MSN_SOAP_ABORT;
-	}
-}
-
-static int msn_soap_oim_free_data( struct msn_soap_req_data *soap_req )
-{
-	struct msn_soap_oim_send_data *oim = soap_req->data;
-	
-	g_free( oim->to );
-	g_free( oim->msg );
-	g_free( oim );
-	
-	return MSN_SOAP_OK;
-}
-
-int msn_soap_oim_send( struct im_connection *ic, const char *to, const char *msg )
-{
-	struct msn_soap_oim_send_data *data;
-	
-	/* Don't send any of the special messages since they creep people out. :-) */
-	if( strncmp( msg, "\r\r", 2 ) == 0 )
-		return 0;
-	
-	data = g_new0( struct msn_soap_oim_send_data, 1 );
-	data->to = g_strdup( to );
-	data->msg = tobase64( msg );
-	data->number = 1;
-	
-	return msn_soap_start( ic, data, msn_soap_oim_build_request,
-	                                 msn_soap_oim_send_parser,
-	                                 msn_soap_oim_handle_response,
-	                                 msn_soap_oim_free_data );
-}
-
-int msn_soap_oim_send_queue( struct im_connection *ic, GSList **msgq )
-{
-	GSList *l;
-	char *n = NULL;
-	
-	for( l = *msgq; l; l = l->next )
-	{
-		struct msn_message *m = l->data;
-		
-		if( n == NULL )
-			n = m->who;
-		if( strcmp( n, m->who ) == 0 )
-			msn_soap_oim_send( ic, m->who, m->text );
-	}
-	
-	while( *msgq != NULL )
-	{
-		struct msn_message *m = (*msgq)->data;
-		
-		g_free( m->who );
-		g_free( m->text );
-		g_free( m );
-		
-		*msgq = g_slist_remove( *msgq, m );
-	}
-	
-	return 1;
-}
-
-
 /* memlist: Fetching the membership list (NOT address book) */
 
Index: protocols/msn/soap.h
===================================================================
--- protocols/msn/soap.h	(revision eb54f56f35b611d03913cde2244e7eab431dc271)
+++ protocols/msn/soap.h	(revision c59f594c9a11a427997a1416900372dcef75818d)
@@ -144,38 +144,4 @@
 
 int msn_soap_passport_sso_request( struct im_connection *ic, const char *nonce );
-
-
-#define SOAP_OIM_SEND_URL "https://ows.messenger.msn.com/OimWS/oim.asmx"
-#define SOAP_OIM_SEND_ACTION "http://messenger.live.com/ws/2006/09/oim/Store2"
-
-#define SOAP_OIM_SEND_PAYLOAD \
-"<?xml version=\"1.0\" encoding=\"utf-8\"?>" \
-"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">" \
-"<soap:Header>" \
-  "<From memberName=\"%s\" friendlyName=\"=?utf-8?B?%s?=\" xml:lang=\"nl-nl\" proxy=\"MSNMSGR\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\" msnpVer=\"%s\" buildVer=\"%s\"/>" \
-  "<To memberName=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \
-  "<Ticket passport=\"%s\" appid=\"%s\" lockkey=\"%s\" xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\"/>" \
-  "<Sequence xmlns=\"http://schemas.xmlsoap.org/ws/2003/03/rm\">" \
-    "<Identifier xmlns=\"http://schemas.xmlsoap.org/ws/2002/07/utility\">http://messenger.msn.com</Identifier>" \
-    "<MessageNumber>%d</MessageNumber>" \
-  "</Sequence>" \
-"</soap:Header>" \
-"<soap:Body>" \
-  "<MessageType xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">text</MessageType>" \
-  "<Content xmlns=\"http://messenger.msn.com/ws/2004/09/oim/\">" \
-    "MIME-Version: 1.0\r\n" \
-    "Content-Type: text/plain; charset=UTF-8\r\n" \
-    "Content-Transfer-Encoding: base64\r\n" \
-    "X-OIM-Message-Type: OfflineMessage\r\n" \
-    "X-OIM-Run-Id: {F9A6C9DD-0D94-4E85-9CC6-F9D118CC1CAF}\r\n" \
-    "X-OIM-Sequence-Num: %d\r\n" \
-    "\r\n" \
-    "%s" \
-  "</Content>" \
-"</soap:Body>" \
-"</soap:Envelope>"
-
-int msn_soap_oim_send( struct im_connection *ic, const char *to, const char *msg );
-int msn_soap_oim_send_queue( struct im_connection *ic, GSList **msgq );
 
 
