diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-06 15:11:08 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-06 15:11:08 +0000 |
commit | 9dd46372ff722a54d70ae383b79542f6d3c60200 (patch) | |
tree | f01dd76768b3f529434bf2750a11cdaffbed77d4 /src/irc | |
parent | 80dff168fd2ec087508cc3632d4ceff4e2ec98cb (diff) | |
download | irssi-9dd46372ff722a54d70ae383b79542f6d3c60200.zip |
Allow sending USER before NICK when logging in.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2198 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/proxy/listen.c | 9 | ||||
-rw-r--r-- | src/irc/proxy/module.h | 1 |
2 files changed, 7 insertions, 3 deletions
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; diff --git a/src/irc/proxy/module.h b/src/irc/proxy/module.h index 5a5c800f..3635d73f 100644 --- a/src/irc/proxy/module.h +++ b/src/irc/proxy/module.h @@ -26,6 +26,7 @@ typedef struct { LISTEN_REC *listen; IRC_SERVER_REC *server; unsigned int pass_sent:1; + unsigned int user_sent:1; unsigned int connected:1; } CLIENT_REC; |