summaryrefslogtreecommitdiff
path: root/modules/core/ns_identify.cpp
diff options
context:
space:
mode:
authorDukePyrolator <DukePyrolator@anope.org>2011-03-12 09:27:16 +0100
committerDukePyrolator <DukePyrolator@anope.org>2011-03-12 09:27:16 +0100
commitfbae3344ff70f9e035292fdc9a6e09efc2702aed (patch)
tree440df041a811317db159365a6322bae9cd596643 /modules/core/ns_identify.cpp
parent95469fde3055e1a257fd4e1027617892b912d07c (diff)
added ns_cert
Diffstat (limited to 'modules/core/ns_identify.cpp')
-rw-r--r--modules/core/ns_identify.cpp43
1 files changed, 3 insertions, 40 deletions
diff --git a/modules/core/ns_identify.cpp b/modules/core/ns_identify.cpp
index a15d0a465..742fe986a 100644
--- a/modules/core/ns_identify.cpp
+++ b/modules/core/ns_identify.cpp
@@ -29,7 +29,7 @@ class CommandNSIdentify : public Command
const Anope::string &nick = params.size() == 2 ? params[0] : u->nick;
Anope::string pass = params[params.size() - 1];
- NickAlias *na = findnick(nick), *this_na = findnick(u->nick);
+ NickAlias *na = findnick(nick);
if (!na)
source.Reply(_(NICK_NOT_REGISTERED));
else if (na->HasFlag(NS_FORBIDDEN))
@@ -59,46 +59,9 @@ class CommandNSIdentify : public Command
if (u->IsIdentified())
Log(LOG_COMMAND, u, this) << "to log out of account " << u->Account()->display;
- na->last_realname = u->realname;
- na->last_seen = Anope::CurTime;
-
- u->Login(na->nc);
- ircdproto->SendAccountLogin(u, u->Account());
- ircdproto->SetAutoIdentificationToken(u);
-
- if (this_na && this_na->nc == na->nc && this_na->nc->HasFlag(NI_UNCONFIRMED) == false)
- u->SetMode(NickServ, UMODE_REGISTERED);
-
- u->UpdateHost();
-
- Log(LOG_COMMAND, u, this) << "and identified for account " << u->Account()->display;
+ Log(LOG_COMMAND, u, this) << "and identified for account " << na->nc->display;
source.Reply(_("Password accepted - you are now recognized."));
- if (ircd->vhost)
- do_on_id(u);
- if (Config->NSModeOnID)
- do_setmodes(u);
-
- FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
-
- if (Config->NSForceEmail && u->Account()->email.empty())
- {
- source.Reply(_("You must now supply an e-mail for your nick.\n"
- "This e-mail will allow you to retrieve your password in\n"
- "case you forget it."));
- source.Reply(_("Type \002%R%s SET EMAIL \037e-mail\037\002 in order to set your e-mail.\n"
- "Your privacy is respected; this e-mail won't be given to\n"
- "any third-party person."), NickServ->nick.c_str());
- }
-
- if (u->Account()->HasFlag(NI_UNCONFIRMED))
- {
- source.Reply(_("Your email address is not confirmed. To confirm it, follow the instructions that were emailed to you when you registered."));
- time_t time_registered = Anope::CurTime - na->time_registered;
- if (Config->NSUnconfirmedExpire > time_registered)
- source.Reply(_("Your account will expire, if not confirmed, in %s"), duration(Config->NSUnconfirmedExpire - time_registered).c_str());
- }
-
- check_memos(u);
+ u->Identify(na);
}
}
return MOD_CONT;