diff --git a/include/users.h b/include/users.h index e76c2a427..4a4ea845f 100644 --- a/include/users.h +++ b/include/users.h @@ -188,15 +188,16 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe void SendMessage(const BotInfo *source, const char *fmt, ...); void SendMessage(const BotInfo *source, const Anope::string &msg) anope_override; - /** Identify the user to the Nick + /** Identify the user to a nick. * updates last_seen, logs the user in, * send messages, checks for mails, set vhost and more - * @param the NickAlias + * @param na the nick to identify to, should be the same as + * the user's current nick */ void Identify(NickAlias *na); - /** Login the user to a NickCore - * @param core The account the user is useing + /** Login the user to an account + * @param core The account */ void Login(NickCore *core); diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index e8adec549..5f768f6cb 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -226,9 +226,7 @@ class CommandNSRegister : public Command if (u) { - u->Login(nc); - if (!nc->HasExt("UNCONFIRMED")) - IRCD->SendLogin(u); + u->Identify(na); u->lastnickreg = Anope::CurTime; } } diff --git a/src/users.cpp b/src/users.cpp index 7f9a49049..c614a02ca 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -302,6 +302,8 @@ void User::Identify(NickAlias *na) this->Login(na->nc); + IRCD->SendLogin(this); + FOREACH_MOD(OnNickIdentify, (this)); if (this->IsServicesOper()) @@ -335,8 +337,6 @@ void User::Login(NickCore *core) this->UpdateHost(); - IRCD->SendLogin(this); - if (this->server->IsSynced()) Log(this, "account") << "is now identified as " << this->nc->display;