mirror of
https://github.com/anope/anope.git
synced 2026-07-09 07:03:14 +02:00
Use the most recent NickServ collide/release timer for a nick instead of using the old and rejecting new ones
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2564 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -45,6 +45,13 @@ class NickServCollide : public Timer
|
||||
|
||||
NickServCollide(NickAlias *nickalias, time_t delay) : Timer(delay), na(nickalias)
|
||||
{
|
||||
/* Erase the current collide and use the new one */
|
||||
std::map<NickAlias *, NickServCollide *>::iterator nit = NickServCollides.find(nickalias);
|
||||
if (nit != NickServCollides.end())
|
||||
{
|
||||
NickServCollides.erase(nit);
|
||||
}
|
||||
|
||||
it = NickServCollides.insert(std::make_pair(nickalias, this));
|
||||
}
|
||||
|
||||
@@ -92,6 +99,13 @@ class NickServRelease : public Timer
|
||||
|
||||
NickServRelease(NickAlias *nickalias, time_t delay) : Timer(delay), na(nickalias)
|
||||
{
|
||||
/* Erase the current release timer and use the new one */
|
||||
std::map<NickAlias *, NickServRelease *>::iterator nit = NickServReleases.find(nickalias);
|
||||
if (nit != NickServReleases.end())
|
||||
{
|
||||
NickServReleases.erase(nit);
|
||||
}
|
||||
|
||||
it = NickServReleases.insert(std::make_pair(nickalias, this));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user