]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_xline_db.cpp
Various improvements to UNIX socket support.
[user/henk/code/inspircd.git] / src / modules / m_xline_db.cpp
index 90f9de9d2958f1a98e5b489b7b709478da9f6c1d..925024aea51baed27027aa74304692daf173aacd 100644 (file)
@@ -51,7 +51,8 @@ class ModuleXLineDB : public Module
         */
        void OnAddLine(User* source, XLine* line) CXX11_OVERRIDE
        {
-               dirty = true;
+               if (!line->from_config)
+                       dirty = true;
        }
 
        /** Called whenever an xline is deleted.
@@ -61,7 +62,8 @@ class ModuleXLineDB : public Module
         */
        void OnDelLine(User* source, XLine* line) CXX11_OVERRIDE
        {
-               dirty = true;
+               if (!line->from_config)
+                       dirty = true;
        }
 
        void OnBackgroundTimer(time_t now) CXX11_OVERRIDE
@@ -113,6 +115,9 @@ class ModuleXLineDB : public Module
                        for (LookupIter i = lookup->begin(); i != lookup->end(); ++i)
                        {
                                XLine* line = i->second;
+                               if (line->from_config)
+                                       continue;
+
                                stream << "LINE " << line->type << " " << line->Displayable() << " "
                                        << line->source << " " << line->set_time << " "
                                        << line->duration << " :" << line->reason << std::endl;
@@ -212,7 +217,7 @@ class ModuleXLineDB : public Module
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Keeps a dynamic log of all XLines created, and stores them in a separate conf file (xline.db).", VF_VENDOR);
+               return Version("Provides the ability to store X-lines in a database file", VF_VENDOR);
        }
 };