]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_permchannels.cpp
Update wiki links to use HTTPS and point to the correct pages.
[user/henk/code/inspircd.git] / src / modules / m_permchannels.cpp
index 69a2826378f334ce171dfaeb551d7983dd0bcbde..74a798356c1a67b8cf05aac577932d9d0afbb11e 100644 (file)
@@ -156,12 +156,7 @@ static bool WriteDatabase(Module* mod, bool save_listmodes)
        }
 
 #ifdef _WIN32
-       if (remove(permchannelsconf.c_str()))
-       {
-               ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot remove old database! %s (%d)", strerror(errno), errno);
-               ServerInstance->SNO->WriteToSnoMask('a', "database: cannot remove old database: %s (%d)", strerror(errno), errno);
-               return false;
-       }
+       remove(permchannelsconf.c_str());
 #endif
        // Use rename to move temporary to new db - this is guarenteed not to fuck up, even in case of a crash.
        if (rename(tempname.c_str(), permchannelsconf.c_str()) < 0)
@@ -303,6 +298,12 @@ public:
 
                                ServerInstance->Logs->Log("m_permchannels", DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str());
 
+                               if (modes.find('P') == std::string::npos)
+                               {
+                                       ServerInstance->Logs->Log("m_permchannels", DEFAULT, "%s (%s) does not have +P set in <permchannels:modes>; it will be deleted when empty!",
+                                               c->name.c_str(), tag->getTagLocation().c_str());
+                               }
+
                                if (modes.empty())
                                        continue;