}
free(client->saslusername);
client->saslusername = 0;
+ newUser(client);
}
}
static void cont_pass(struct client_data *client, int res) {
}
void newUser(struct client_data *client) {
- if (client->regstate == REG_CAPLS || !client->nick_reg || !client->username || client->passwait || client->webircwait)
+ if (client->regstate != REG_INIT || !client->nick_reg || !client->username || client->passwait || client->webircwait || client->saslusername)
return;
- if (client->saslbuf || client->saslusername) {
+ if (client->saslbuf) {
copy_strf(&databuf, ":%s 906 * :SASL auhtentication aborted\r\n", hostname), sendbuf(client);
if (client->saslbuf) {
memset(client->saslbuf, 0, 1024);
client->saslbuf = 0;
client->saslbufLen = 0;
}
- if (client->saslusername) {
- free(client->saslusername);
- client->saslusername = 0;
- }
}
if (client->username[0] == '~' && client->pass_reg) {
job_password_check(client, client->username+1, client->pass_reg, getdatafile("users.txt"), cont_pass);