X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_xline_db.cpp;h=5b4553ab7975e728d50b7b5ca63445156d3a00fa;hb=e4acbc95b8b6cd5b28d38a2242c02e8ff4991e4a;hp=aff5bb16ee09eff6e0798a0a7f2444643a3e8b2b;hpb=988e6824d56c603e002813763332816b6d35412b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index aff5bb16e..5b4553ab7 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -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++)