diff options
-rw-r--r-- | src/modules/m_xline_db.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index aff5bb16e..5ad2069ee 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -24,8 +24,8 @@ class ModuleXLineDB : public Module public: ModuleXLineDB(InspIRCd* Me) : Module(Me) { - Implementation eventlist[] = { I_OnAddLine, I_OnDelLine }; - ServerInstance->Modules->Attach(eventlist, this, 2); + Implementation eventlist[] = { I_OnAddLine, I_OnDelLine, I_OnExpireLine }; + ServerInstance->Modules->Attach(eventlist, this, 3); reading_db = true; ReadDatabase(); @@ -59,6 +59,16 @@ class ModuleXLineDB : public Module */ void OnDelLine(User* source, XLine* line) { + RemoveLine(line); + } + + void OnExpireLine(XLine *line) + { + RemoveLine(line); + } + + void RemoveLine(XLine *line) + { ServerInstance->Log(DEBUG, "xlinedb: Removing a line"); for (std::vector<XLine *>::iterator i = xlines.begin(); i != xlines.end(); i++) { |