changeset 2040:64a07b9e9202

[gaim-migrate @ 2050] don't send messages to yourself committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 16 Jun 2001 19:22:48 +0000
parents 859e9c2c5813
children 241ffe9ee605
files plugins/msn/msn.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/msn/msn.c	Sat Jun 16 19:16:25 2001 +0000
+++ b/plugins/msn/msn.c	Sat Jun 16 19:22:48 2001 +0000
@@ -1135,7 +1135,7 @@
 		if (msn_write(ms->fd, buf, strlen(buf)) < 0)
 			msn_kill_switch(ms);
 		debug_printf("\n");
-	} else {
+	} else if (strcmp(who, gc->username)) {
 		g_snprintf(buf, MSN_BUF_LEN, "XFR %d SB\n", ++md->trId);
 		if (msn_write(md->fd, buf, strlen(buf)) < 0) {
 			hide_login_progress(gc, "Write error");
@@ -1149,7 +1149,8 @@
 		ms->txqueue = g_strdup(message);
 		ms->gc = gc;
 		ms->fd = -1;
-	}
+	} else
+		do_error_dialog("MSN: You can't send a message to yourself", "MSN Error");
 }
 
 static void msn_chat_send(struct gaim_connection *gc, int id, char *message)