1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 12:46:39 +02:00

Cleanup of various different crashes/inconsistancies

This commit is contained in:
Adam
2010-08-15 14:08:05 -04:00
parent a950ed8cab
commit c2a97d9f3f
12 changed files with 45 additions and 83 deletions
+3 -4
View File
@@ -407,16 +407,15 @@ XLine *XLineManager::Check(User *u)
{
const time_t now = time(NULL);
for (std::vector<XLine *>::iterator it = this->XLines.begin(), it_end = this->XLines.end(); it != it_end; ++it)
for (unsigned i = this->XLines.size(); i > 0; --i)
{
XLine *x = *it;
XLine *x = this->XLines[i - 1];
if (x->Expires && x->Expires < now)
{
OnExpire(x);
delete x;
it = XLines.erase(it);
--it;
this->XLines.erase(XLines.begin() + i - 1);
continue;
}