]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Convert IsChannel to std::function.
[user/henk/code/inspircd.git] / src / inspircd.cpp
index a3be309bfb75cd63ff3fb7ba2c3e74174803f812..5f7dfd06fdace1a24c9a9bddeed3e41010e12f8e 100644 (file)
@@ -227,9 +227,9 @@ InspIRCd::InspIRCd(int argc, char** argv) :
          * themselves within the class.
          */
         GenRandom(&HandleGenRandom),
-        IsChannel(&HandleIsChannel),
-        IsNick(&HandleIsNick),
-        IsIdent(&HandleIsIdent)
+        IsChannel(&DefaultIsChannel),
+        IsNick(&DefaultIsNick),
+        IsIdent(&DefaultIsIdent)
 {
        ServerInstance = this;
 
@@ -309,7 +309,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
                                /* Fall through to handle other weird values too */
                                std::cout << "Unknown parameter '" << argv[optind-1] << "'" << std::endl;
                                std::cout << "Usage: " << argv[0] << " [--nofork] [--nolog] [--debug] [--config <config>]" << std::endl <<
-                                       std::string(static_cast<int>(8+strlen(argv[0])), ' ') << "[--runasroot] [--version]" << std::endl;
+                                       std::string(static_cast<size_t>(8+strlen(argv[0])), ' ') << "[--runasroot] [--version]" << std::endl;
                                Exit(EXIT_STATUS_ARGV);
                        break;
                }
@@ -427,7 +427,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
        // Build ISupport as ModuleManager::LoadAll() does not do it
        this->ISupport.Build();
-       Config->ApplyDisabledCommands(Config->DisabledCommands);
+       Config->ApplyDisabledCommands();
 
        if (!pl.empty())
        {
@@ -437,7 +437,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
                int j = 1;
                for (FailedPortList::iterator i = pl.begin(); i != pl.end(); i++, j++)
                {
-                       std::cout << j << ".\tAddress: " << (i->first.empty() ? "<all>" : i->first) << " \tReason: " << i->second << std::endl;
+                       std::cout << j << ".\tAddress: " << i->first.str() << " \tReason: " << strerror(i->second) << std::endl;
                }
 
                std::cout << std::endl << "Hint: Try using a public IP instead of blank or *" << std::endl;
@@ -498,7 +498,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        QueryPerformanceFrequency(&stats.QPFrequency);
 #endif
 
-       Logs->Log("STARTUP", LOG_DEFAULT, "Startup complete as '%s'[%s], %d max open sockets", Config->ServerName.c_str(),Config->GetSID().c_str(), SocketEngine::GetMaxFds());
+       Logs->Log("STARTUP", LOG_DEFAULT, "Startup complete as '%s'[%s], %lu max open sockets", Config->ServerName.c_str(),Config->GetSID().c_str(), SocketEngine::GetMaxFds());
 
 #ifndef _WIN32
        ConfigTag* security = Config->ConfValue("security");
@@ -642,8 +642,15 @@ void InspIRCd::Run()
                        OLDTIME = TIME.tv_sec;
 
                        if ((TIME.tv_sec % 3600) == 0)
+                       {
                                FOREACH_MOD(OnGarbageCollect, ());
 
+                               // HACK: ELines are not expired properly at the moment but it can't be fixed as
+                               // the 2.0 XLine system is a spaghetti nightmare. Instead we skip over expired
+                               // ELines in XLineManager::CheckELines() and expire them here instead.
+                               XLines->GetAll("E");
+                       }
+
                        Timers.TickTimers(TIME.tv_sec);
                        Users->DoBackgroundUserStuff();