summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-12-08 21:57:11 +0000
committerPeter Powell <petpow@saberuk.com>2019-12-08 21:57:51 +0000
commit6b80d34c9f02693883549c87843f669d567b7bee (patch)
treecc125773ab67824fc004aa2a8b6a0921eec7ac58
parent01328257ff30946af870d2c7665802949b5dfd78 (diff)
Move XLine garbage collection to core_xline.
-rw-r--r--src/coremods/core_xline/core_xline.cpp8
-rw-r--r--src/inspircd.cpp7
2 files changed, 8 insertions, 7 deletions
diff --git a/src/coremods/core_xline/core_xline.cpp b/src/coremods/core_xline/core_xline.cpp
index e8f045c58..2a8445897 100644
--- a/src/coremods/core_xline/core_xline.cpp
+++ b/src/coremods/core_xline/core_xline.cpp
@@ -93,6 +93,14 @@ class CoreModXLine : public Module
return MOD_RES_DENY;
}
+ void OnGarbageCollect() CXX11_OVERRIDE
+ {
+ // HACK: ELines are not expired properly at the moment but it can't be fixed
+ // as the XLine system is a spaghetti nightmare. Instead we skip over expired
+ // ELines in XLineManager::CheckELines() and expire them here instead.
+ ServerInstance->XLines->GetAll("E");
+ }
+
Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the ELINE, GLINE, KLINE, QLINE, and ZLINE commands", VF_VENDOR|VF_CORE);
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 609c0b8b6..0c8b3ccd1 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -654,15 +654,8 @@ void InspIRCd::Run()
OLDTIME = TIME.tv_sec;
if ((TIME.tv_sec % 3600) == 0)
- {
FOREACH_MOD(OnGarbageCollect, ());
- // HACK: ELines are not expired properly at the moment but it can't be fixed as
- // the 2.0 XLine system is a spaghetti nightmare. Instead we skip over expired
- // ELines in XLineManager::CheckELines() and expire them here instead.
- XLines->GetAll("E");
- }
-
Timers.TickTimers(TIME.tv_sec);
Users->DoBackgroundUserStuff();