]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_xline_db.cpp
Header update: 2007 -> 2008
[user/henk/code/inspircd.git] / src / modules / m_xline_db.cpp
index aff5bb16ee09eff6e0798a0a7f2444643a3e8b2b..5b4553ab7975e728d50b7b5ca63445156d3a00fa 100644 (file)
@@ -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<XLine *>::iterator i = xlines.begin(); i != xlines.end(); i++)