1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Allow sending USER before NICK when logging in.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2198 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-06 15:11:08 +00:00 committed by cras
parent 80dff168fd
commit 9dd46372ff
2 changed files with 7 additions and 3 deletions

View File

@ -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;

View File

@ -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;