1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 14:33:15 +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
+2 -15
View File
@@ -1161,9 +1161,7 @@ struct IRCDMessageUID : IRCDMessage
for (unsigned i = 9; i < params.size() - 1; ++i)
modes += " " + params[i];
User *u = new User(params[2], params[5], params[3], params[4], params[6], source.GetServer(), params[params.size() - 1], ts, modes, params[0]);
if (u->server->IsSynced() && NickServService)
NickServService->Validate(u);
new User(params[2], params[5], params[3], params[4], params[6], source.GetServer(), params[params.size() - 1], ts, modes, params[0]);
}
};
@@ -1221,7 +1219,7 @@ class ProtoInspIRCd : public Module
{
this->SetAuthor("Anope");
Implementation i[] = { I_OnUserNickChange, I_OnServerSync };
Implementation i[] = { I_OnUserNickChange };
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
Servers::Capab.insert("NOQUIT");
@@ -1244,17 +1242,6 @@ class ProtoInspIRCd : public Module
*/
u->RemoveMode(NickServ, UMODE_REGISTERED);
}
void OnServerSync(Server *s) anope_override
{
if (NickServService)
for (user_map::const_iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it)
{
User *u = it->second;
if (u->server == s && !u->IsIdentified())
NickServService->Validate(u);
}
}
};
MODULE_INIT(ProtoInspIRCd)