]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Clarify error message when attempting to /NICK while banned
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 47660f75267234ed3bdfbc87110750e415b2fc41..8c5137d3b426d187bfeaa3a285f443836d816912 100644 (file)
        #include <sys/resource.h>
        #include <dlfcn.h>
        #include <getopt.h>
-
-       /* Some systems don't define RUSAGE_SELF. This should fix them. */
-       #ifndef RUSAGE_SELF
-               #define RUSAGE_SELF 0
-       #endif
-
        #include <pwd.h> // setuid
        #include <grp.h> // setgid
 #else
@@ -226,10 +220,10 @@ InspIRCd::InspIRCd(int argc, char** argv) :
          * THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods
          * themselves within the class.
          */
-        GenRandom(&HandleGenRandom),
-        IsChannel(&HandleIsChannel),
-        IsNick(&HandleIsNick),
-        IsIdent(&HandleIsIdent)
+        GenRandom(&DefaultGenRandom),
+        IsChannel(&DefaultIsChannel),
+        IsNick(&DefaultIsNick),
+        IsIdent(&DefaultIsIdent)
 {
        ServerInstance = this;
 
@@ -309,7 +303,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;
                }
@@ -404,7 +398,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
        this->Config->Read();
        this->Config->Apply(NULL, "");
        Logs->OpenFileLogs();
-       ModeParser::InitBuiltinModes();
 
        // If we don't have a SID, generate one based on the server name and the server description
        if (Config->sid.empty())
@@ -427,7 +420,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())
        {
@@ -498,7 +491,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");