mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05: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:
parent
80dff168fd
commit
9dd46372ff
@ -104,9 +104,12 @@ static void handle_client_connect_cmd(CLIENT_REC *client,
|
|||||||
g_free_not_null(client->nick);
|
g_free_not_null(client->nick);
|
||||||
client->nick = g_strdup(args);
|
client->nick = g_strdup(args);
|
||||||
} else if (strcmp(cmd, "USER") == 0) {
|
} else if (strcmp(cmd, "USER") == 0) {
|
||||||
if (client->nick == NULL ||
|
client->user_sent = TRUE;
|
||||||
(*password != '\0' && !client->pass_sent)) {
|
}
|
||||||
/* stupid client didn't send us NICK/PASS, kill it */
|
|
||||||
|
if (client->nick != NULL && client->user_sent) {
|
||||||
|
if (*password != '\0' && !client->pass_sent) {
|
||||||
|
/* client didn't send us PASS, kill it */
|
||||||
remove_client(client);
|
remove_client(client);
|
||||||
} else {
|
} else {
|
||||||
client->connected = TRUE;
|
client->connected = TRUE;
|
||||||
|
@ -26,6 +26,7 @@ typedef struct {
|
|||||||
LISTEN_REC *listen;
|
LISTEN_REC *listen;
|
||||||
IRC_SERVER_REC *server;
|
IRC_SERVER_REC *server;
|
||||||
unsigned int pass_sent:1;
|
unsigned int pass_sent:1;
|
||||||
|
unsigned int user_sent:1;
|
||||||
unsigned int connected:1;
|
unsigned int connected:1;
|
||||||
} CLIENT_REC;
|
} CLIENT_REC;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user