diff options
author | Adam <Adam@anope.org> | 2011-02-09 21:54:28 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-09 21:54:28 -0500 |
commit | 7bdf592f7ea2d527930ada96d8e07fae966239d4 (patch) | |
tree | 2947a983175513c69d108c937ea53d150e95b368 /src/sessions.cpp | |
parent | f463b772b020b272f3322799c9a55b755cdf3067 (diff) |
Log rawio when in debug mode and fixed expiring session exceptions
Diffstat (limited to 'src/sessions.cpp')
-rw-r--r-- | src/sessions.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sessions.cpp b/src/sessions.cpp index d1b0fcfdd..d9ee39362 100644 --- a/src/sessions.cpp +++ b/src/sessions.cpp @@ -200,17 +200,16 @@ void del_session(User *u) 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); } } |