# HG changeset patch # User Rob Flynn # Date 977209361 0 # Node ID 751937b4f109601b4c3a2dd9d02f59f74d556f0f # Parent 868f9c98db13dde5265beeb6e4290d2ccd3c8567 [gaim-migrate @ 1317] MSN doesn't support sending a message to yourself. committer: Tailor Script diff -r 868f9c98db13 -r 751937b4f109 plugins/msn/msn.c --- a/plugins/msn/msn.c Tue Dec 19 04:23:36 2000 +0000 +++ b/plugins/msn/msn.c Tue Dec 19 07:02:41 2000 +0000 @@ -125,6 +125,8 @@ char c; int i = 0; + printf("%s (%d)\n", strerror(errno), errno); + do { status = recv(fd, &c, 1, 0); @@ -140,6 +142,7 @@ /* I'm a bastard again :-) */ printf("MSN: %s\n", buf); + printf("%s (%d)\n", strerror(errno), errno); } int msn_connect(char *server, int port) @@ -649,6 +652,12 @@ mdata = (struct msn_data *)gc->proto_data; mc = find_msn_conn_by_user(who); + /* Are we trying to send a message to ourselves? Naughty us! */ + if (!g_strcasecmp(who, gc->username)) { + do_error_dialog("You cannot send a message to yourself!!", "GAIM: Msn Error"); + return; + } + if (mc == NULL) { gchar buf2[4096]; gchar *address; @@ -710,7 +719,7 @@ /* FIXME: This causes a delay. I will make some sort of queing feature to prevent * this from being needed */ - while (!strstr(buf2, "JOI")) { + while ((!strstr(buf2, "JOI")) && (!g_strncasecmp(buf2, "215", 3))) { msn_read_line(&buf2, mc->fd); }