1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 21:46:39 +02:00

Fixed expiring session exceptions

This commit is contained in:
Adam
2011-02-09 21:55:11 -05:00
parent b6ab031fc1
commit 634e9af9cb
+3 -4
View File
@@ -210,17 +210,16 @@ void del_session(const Anope::string &host)
void expire_exceptions()
{
for (std::vector<Exception *>::iterator it = exceptions.begin(), it_end = exceptions.end(); it != it_end; )
for (unsigned i = exceptions.size(); i > 0; --i)
{
Exception *e = *it;
std::vector<Exception *>::iterator curr_it = it++;
Exception *e = exceptions[i - 1];
if (!e->expires || e->expires > Anope::CurTime)
continue;
if (Config->WallExceptionExpire)
ircdproto->SendGlobops(OperServ, "Session limit exception for %s has expired.", e->mask.c_str());
delete e;
exceptions.erase(curr_it);
exceptions.erase(exceptions.begin() + i - 1);
}
}