mirror of
https://github.com/anope/anope.git
synced 2026-06-12 19:14:47 +02:00
Fixed deleting expired SXLines
This commit is contained in:
@@ -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
|
||||
|
||||
+4
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user