From fd71f2ac1962a879d0404bc7ddf079ee1d0d3e09 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 9 Jan 2008 12:31:59 +0000 Subject: Add OnExpireLine hook to xline db stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8677 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_xline_db.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/modules') 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(); @@ -58,6 +58,16 @@ class ModuleXLineDB : public Module * @param line the line being deleted */ 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::iterator i = xlines.begin(); i != xlines.end(); i++) -- cgit v1.2.3