summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 20:54:27 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-31 20:54:27 +0000
commit78f7265d8d33452820f9f7642f449681a1557f75 (patch)
treeb7ec53ad9b60a9867b5d3c08933751e95cccdd7e /src
parent6d55471b673a88e185e009d920a55cd2d0ecc1f0 (diff)
Start to fix broken expiry
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8445 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/xline.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 9d0b12fa3..3c1259eac 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -6,7 +6,7 @@
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -169,7 +169,6 @@ bool XLineManager::DelLine(const char* hostmask, char type, User* user, bool sim
if (!simulate)
{
(*i)->Unset();
- delete *i;
active_lines.erase(i);
if (lookup_lines.find(type) != lookup_lines.end())
lookup_lines[type].erase(hostmask);
@@ -179,6 +178,8 @@ bool XLineManager::DelLine(const char* hostmask, char type, User* user, bool sim
std::vector<XLine*>::iterator pptr = std::find(pending_lines.begin(), pending_lines.end(), *i);
if (pptr != pending_lines.end())
pending_lines.erase(pptr);
+
+ delete *i;
}
return true;
}
@@ -370,7 +371,15 @@ void XLineManager::expire_lines()
std::vector<XLine*>::iterator i = active_lines.begin();
(*i)->DisplayExpiry();
(*i)->Unset();
+
active_lines.erase(i);
+ if (lookup_lines.find((*i)->type) != lookup_lines.end())
+ lookup_lines[(*i)->type].erase((*i)->Displayable());
+
+ std::vector<XLine*>::iterator pptr = std::find(pending_lines.begin(), pending_lines.end(), *i);
+ if (pptr != pending_lines.end())
+ pending_lines.erase(pptr);
+
delete *i;
}
}