diff -r 5a484f11e395 -r 1e5d62c19533 src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Tue Jan 28 18:49:42 2003 +0000 +++ b/src/protocols/irc/irc.c Tue Jan 28 21:42:44 2003 +0000 @@ -1664,12 +1664,12 @@ idata = gc->proto_data; - if (source == -1) { + if (source != 1) { hide_login_progress(gc, "Write error"); signoff(gc); return; } - + idata->fd = source; /* Try a quick conversion to see if the specified encoding is OK */ test = g_convert("test", strlen("test"), gc->user->proto_opt[USEROPT_CHARSET], @@ -1682,8 +1682,6 @@ g_free(test); - idata->fd = source; - gethostname(hostname, sizeof(hostname) - 1); hostname[sizeof(hostname) - 1] = 0; if (!*hostname) @@ -1740,10 +1738,9 @@ idata->fd = -1; rc = proxy_connect(user->proto_opt[USEROPT_SERV], - user->proto_opt[USEROPT_PORT][0] ? atoi(user-> - proto_opt[USEROPT_PORT]) : - 6667, irc_login_callback, gc); - if (!user->gc || (rc < 0)) { + user->proto_opt[USEROPT_PORT][0] ? atoi(user->proto_opt[USEROPT_PORT]) : + 6667, irc_login_callback, gc); + if (!user->gc || (rc != 0)) { hide_login_progress(gc, "Unable to create socket"); signoff(gc); return;