Mercurial > pidgin
changeset 1307:751937b4f109
[gaim-migrate @ 1317]
MSN doesn't support sending a message to yourself.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 19 Dec 2000 07:02:41 +0000 |
parents | 868f9c98db13 |
children | 4741b5a75b9f |
files | plugins/msn/msn.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); }