summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-07-21 00:23:24 -0400
committerAdam <Adam@anope.org>2013-07-21 00:23:24 -0400
commit5aac04dffe1aafc3f6c26828844fdb6d42dc66c8 (patch)
tree1cb7a0f3c36322e83c58379f700646fffce5d82b
parent7480fbda2b308b914e942d36e9a29a9f7d7a5d5a (diff)
Move SendLogin() back to User::Identify, it was moved at some point? but doesn't as intended in ::Login
-rw-r--r--include/users.h9
-rw-r--r--modules/commands/ns_register.cpp4
-rw-r--r--src/users.cpp4
3 files changed, 8 insertions, 9 deletions
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;