From 9dd46372ff722a54d70ae383b79542f6d3c60200 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 6 Dec 2001 15:11:08 +0000 Subject: Allow sending USER before NICK when logging in. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2198 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/proxy/listen.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/irc/proxy/listen.c') diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c index 7874ed60..db028e7e 100644 --- a/src/irc/proxy/listen.c +++ b/src/irc/proxy/listen.c @@ -104,9 +104,12 @@ static void handle_client_connect_cmd(CLIENT_REC *client, g_free_not_null(client->nick); client->nick = g_strdup(args); } else if (strcmp(cmd, "USER") == 0) { - if (client->nick == NULL || - (*password != '\0' && !client->pass_sent)) { - /* stupid client didn't send us NICK/PASS, kill it */ + client->user_sent = TRUE; + } + + if (client->nick != NULL && client->user_sent) { + if (*password != '\0' && !client->pass_sent) { + /* client didn't send us PASS, kill it */ remove_client(client); } else { client->connected = TRUE; -- cgit v1.2.3