summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-23 00:03:50 -0500
committerAdam <Adam@anope.org>2010-12-24 20:07:59 -0500
commitc7a44bfd8eb98712a857beffec931e020a883161 (patch)
treee2952d5167a06e68012168f1ecd14ea9aab076e6
parent839fb4e5f02acdb46136dbd13890ec9b3c93cf22 (diff)
Fixed deleting expired SXLines
-rw-r--r--include/operserv.h2
-rw-r--r--src/operserv.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/operserv.h b/include/operserv.h
index 8bac11e76..20d24ae5d 100644
--- a/include/operserv.h
+++ b/include/operserv.h
@@ -142,11 +142,13 @@ class CoreExport XLineManager
*/
virtual XLine *Add(BotInfo *bi, User *u, const Anope::string &mask, time_t expires, const Anope::string &reason);
+ private:
/** Delete an XLine, eg, remove it from the IRCd.
* @param x The xline
*/
virtual void Del(XLine *x);
+ public:
/** Checks if a mask can/should be added to the XLineManager
* @param mask The mask
* @param expires When the mask would expire
diff --git a/src/operserv.cpp b/src/operserv.cpp
index ff1862503..82a606b90 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -297,6 +297,8 @@ bool XLineManager::DelXLine(XLine *x)
if (it != this->XLines.end())
{
+ this->Del(x);
+
delete x;
this->XLines.erase(it);
@@ -427,7 +429,8 @@ XLine *XLineManager::Check(User *u)
if (x->Expires && x->Expires < Anope::CurTime)
{
- OnExpire(x);
+ this->OnExpire(x);
+ this->Del(x);
delete x;
this->XLines.erase(XLines.begin() + i - 1);
continue;