diff --git a/src/modules/authprompt.c b/src/modules/authprompt.c index 611ea58b0..83c96594a 100644 --- a/src/modules/authprompt.c +++ b/src/modules/authprompt.c @@ -483,7 +483,7 @@ int authprompt_sasl_result(Client *client, int success) } /* Authentication was a success */ - if (*client->name && client->user && *client->user->username && IsNotSpoof(client)) + if (is_handshake_finished(client)) { register_user(client); /* User MAY be killed now. But since we 'return 1' below, it's safe */ diff --git a/src/modules/cap.c b/src/modules/cap.c index 08ffe5e31..0b4a5d01c 100644 --- a/src/modules/cap.c +++ b/src/modules/cap.c @@ -209,7 +209,7 @@ static void cap_end(Client *client, const char *arg) ClearCapabilityFast(client, CAP_IN_PROGRESS); - if (*client->name && client->user && *client->user->username && IsNotSpoof(client)) + if (is_handshake_finished(client)) register_user(client); }