summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-09 12:31:59 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-09 12:31:59 +0000
commitfd71f2ac1962a879d0404bc7ddf079ee1d0d3e09 (patch)
treed2d387a0ce3773873d9cf1d97471ae55c8338ac7 /src
parent6f84254ed6681c79d606679cecb9420d394c8c47 (diff)
Add OnExpireLine hook to xline db stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8677 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_xline_db.cpp14
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++)
{