1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 09:33:12 +02:00

Don't compare system time to a users timestamp to determine when to collide with a user, if the time on services vs the ircd are different it does weird things

This commit is contained in:
Adam
2013-05-28 21:07:07 -04:00
parent c5bc8fab32
commit 576aaff3da
+4 -3
View File
@@ -17,10 +17,11 @@ class NickServCollide : public Timer
{
NickServService *service;
Reference<User> u;
time_t ts;
Reference<NickAlias> na;
public:
NickServCollide(NickServService *nss, User *user, NickAlias *nick, time_t delay) : Timer(delay), service(nss), u(user), na(nick)
NickServCollide(NickServService *nss, User *user, NickAlias *nick, time_t delay) : Timer(delay), service(nss), u(user), ts(user->timestamp), na(nick)
{
}
@@ -29,7 +30,7 @@ class NickServCollide : public Timer
if (!u || !na)
return;
/* If they identified or don't exist anymore, don't kill them. */
if (u->Account() == na->nc || u->timestamp > this->GetSetTime())
if (u->Account() == na->nc || u->timestamp > ts)
return;
service->Collide(u, na);
@@ -56,7 +57,7 @@ class NickServHeld : public Timer
/** Timer for releasing nicks to be available for use
*/
class CoreExport NickServRelease : public User, public Timer
class NickServRelease : public User, public Timer
{
static std::map<Anope::string, NickServRelease *> NickServReleases;
Anope::string nick;