1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 13:13:14 +02:00

Move nickserv validate stuff to an event in nickserv.cpp

This commit is contained in:
Adam
2013-01-02 13:59:33 -05:00
parent bf718e8698
commit 827469600e
10 changed files with 68 additions and 106 deletions
+5 -11
View File
@@ -385,19 +385,13 @@ struct IRCDMessageNick : IRCDMessage
}
User *user = new User(params[0], params[4], params[5], "", params[8], s, params[9], params[2].is_pos_number_only() ? convertTo<time_t>(params[2]) : 0, params[3]);
if (user && NickServService)
try
{
const NickAlias *na;
if (user->signon == convertTo<time_t>(params[7]) && (na = NickAlias::Find(user->nick)))
{
NickCore *nc = na->nc;
user->Login(nc);
if (!Config->NoNicknameOwnership && na->nc->HasFlag(NI_UNCONFIRMED) == false)
user->SetMode(NickServ, UMODE_REGISTERED);
}
else
NickServService->Validate(user);
NickAlias *na;
if (NickServService && user->signon == convertTo<time_t>(params[7]) && (na = NickAlias::Find(user->nick)))
NickServService->Login(user, na);
}
catch (const ConvertException &) { }
}
else
source.GetUser()->ChangeNick(params[0]);