Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision 767b2d1ab87d2d835eec091e0aae9af6b225de83)
+++ protocols/msn/msn.c	(revision 074c9b6a1a9275b53c729cc86c5bc3c8dd9af7d7)
@@ -193,5 +193,5 @@
 		"/user", "application/user+xml",
 		strlen(body), body);
-	msn_ns_write(ic, -1, "PUT %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
+	msn_ns_write(ic, "PUT %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
 
 	g_free(buf);
@@ -244,5 +244,5 @@
 static void msn_keepalive(struct im_connection *ic)
 {
-	msn_ns_write(ic, -1, "PNG\r\n");
+	msn_ns_write(ic, "PNG\r\n");
 }
 
Index: protocols/msn/msn.h
===================================================================
--- protocols/msn/msn.h	(revision 767b2d1ab87d2d835eec091e0aae9af6b225de83)
+++ protocols/msn/msn.h	(revision 074c9b6a1a9275b53c729cc86c5bc3c8dd9af7d7)
@@ -217,5 +217,5 @@
 
 /* ns.c */
-int msn_ns_write(struct im_connection *ic, int fd, const char *fmt, ...) G_GNUC_PRINTF(3, 4);
+int msn_ns_write(struct im_connection *ic, const char *fmt, ...) G_GNUC_PRINTF(2, 3);
 gboolean msn_ns_connect(struct im_connection *ic, const char *host, int port);
 void msn_ns_close(struct msn_data *handler);
Index: protocols/msn/msn_util.c
===================================================================
--- protocols/msn/msn_util.c	(revision 767b2d1ab87d2d835eec091e0aae9af6b225de83)
+++ protocols/msn/msn_util.c	(revision 074c9b6a1a9275b53c729cc86c5bc3c8dd9af7d7)
@@ -71,5 +71,5 @@
 
 	if ((adl = adlrml_entry(who, list))) {
-		int st = msn_ns_write(ic, -1, "ADL %d %zd\r\n%s",
+		int st = msn_ns_write(ic, "ADL %d %zd\r\n%s",
 		                      ++md->trId, strlen(adl), adl);
 		g_free(adl);
@@ -105,5 +105,5 @@
 
 	if ((adl = adlrml_entry(who, list))) {
-		int st = msn_ns_write(ic, -1, "RML %d %zd\r\n%s",
+		int st = msn_ns_write(ic, "RML %d %zd\r\n%s",
 		                      ++md->trId, strlen(adl), adl);
 		g_free(adl);
Index: protocols/msn/ns.c
===================================================================
--- protocols/msn/ns.c	(revision 767b2d1ab87d2d835eec091e0aae9af6b225de83)
+++ protocols/msn/ns.c	(revision 074c9b6a1a9275b53c729cc86c5bc3c8dd9af7d7)
@@ -43,5 +43,5 @@
 static void msn_ns_nfy(struct msn_data *md, char *who, char **parts, char *action, gboolean is_put);
 
-int msn_ns_write(struct im_connection *ic, int fd, const char *fmt, ...)
+int msn_ns_write(struct im_connection *ic, const char *fmt, ...)
 {
 	struct msn_data *md = ic->proto_data;
@@ -55,10 +55,6 @@
 	va_end(params);
 
-	if (fd < 0) {
-		fd = md->fd;
-	}
-
 	if (getenv("BITLBEE_DEBUG")) {
-		fprintf(stderr, "\x1b[91m>>>[NS%d] %s\n\x1b[97m", fd, out);
+		fprintf(stderr, "\x1b[91m>>>[NS] %s\n\x1b[97m", out);
 	}
 
@@ -138,5 +134,5 @@
 	}
 
-	if (msn_ns_write(ic, -1, "VER %d %s CVR0\r\n", ++md->trId, MSNP_VER)) {
+	if (msn_ns_write(ic, "VER %d %s CVR0\r\n", ++md->trId, MSNP_VER)) {
 		if (!md->is_http) {
 			md->inpa = b_input_add(md->fd, B_EV_IO_READ, msn_ns_callback, md);
@@ -218,9 +214,9 @@
 		}
 
-		return(msn_ns_write(ic, md->fd, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s VmVyc2lvbjogMQ0KWGZyQ291bnQ6IDINClhmclNlbnRVVENUaW1lOiA2MzU2MTQ3OTU5NzgzOTAwMDANCklzR2VvWGZyOiB0cnVlDQo=\r\n",
+		return(msn_ns_write(ic, "CVR %d 0x0409 mac 10.2.0 ppc macmsgs 3.5.1 macmsgs %s VmVyc2lvbjogMQ0KWGZyQ291bnQ6IDINClhmclNlbnRVVENUaW1lOiA2MzU2MTQ3OTU5NzgzOTAwMDANCklzR2VvWGZyOiB0cnVlDQo=\r\n",
 		                    ++md->trId, ic->acc->user));
 	} else if (strcmp(cmd[0], "CVR") == 0) {
 		/* We don't give a damn about the information we just received */
-		return msn_ns_write(ic, md->fd, "USR %d SSO I %s\r\n", ++md->trId, ic->acc->user);
+		return msn_ns_write(ic, "USR %d SSO I %s\r\n", ++md->trId, ic->acc->user);
 	} else if (strcmp(cmd[0], "XFR") == 0) {
 		char *server;
@@ -302,5 +298,5 @@
 		resp = msn_p11_challenge(cmd[2]);
 
-		st =  msn_ns_write(ic, -1, "QRY %d %s %zd\r\n%s",
+		st =  msn_ns_write(ic, "QRY %d %s %zd\r\n%s",
 		                   ++md->trId, MSNP11_PROD_ID,
 		                   strlen(resp), resp);
@@ -602,5 +598,5 @@
 
 	if (token) {
-		msn_ns_write(ic, -1, "USR %d SSO S %s %s {%s}\r\n", ++md->trId, md->tokens[0], token, md->uuid);
+		msn_ns_write(ic, "USR %d SSO S %s %s {%s}\r\n", ++md->trId, md->tokens[0], token, md->uuid);
 	} else {
 		imcb_error(ic, "Error during Passport authentication: %s", error);
@@ -681,5 +677,5 @@
 	adls = xt_to_string(adl);
 	xt_free_node(adl);
-	msn_ns_write(ic, -1, "ADL %d %zd\r\n%s", ++md->trId, strlen(adls), adls);
+	msn_ns_write(ic, "ADL %d %zd\r\n%s", ++md->trId, strlen(adls), adls);
 	g_free(adls);
 }
@@ -738,5 +734,5 @@
 
 	buf = g_strdup_printf(MSN_MESSAGE_HEADERS, bu->handle, ic->acc->user, md->uuid, message_type, strlen(text), text);
-	retval = msn_ns_write(ic, -1, "SDG %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
+	retval = msn_ns_write(ic, "SDG %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
 	g_free(buf);
 	return retval;
