]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Adjust m_mysql to match the assumed behaviour of m_pgsql exactly, e.g. when there...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 41410a26ca02c4f5049f2e422eab58a43526c9d4..b9cd9f36c072340e7bc3b803dda80ed925dd64a9 100644 (file)
@@ -63,6 +63,7 @@
 #include "helperfuncs.h"
 #include "hashcomp.h"
 #include "socketengine.h"
+#include "inspircd_se_config.h"
 #include "userprocess.h"
 #include "socket.h"
 #include "typedefs.h"
@@ -294,13 +295,14 @@ InspIRCd::InspIRCd(int argc, char** argv)
 
        OpenLog(argv, argc);
        this->stats = new serverstats();
+       this->Parser = new CommandParser();
        Config->ClearStack();
        Config->Read(true,NULL);
        CheckRoot();
        this->ModeGrok = new ModeParser();
-       this->Parser = new CommandParser();
        AddServerName(Config->ServerName);
        CheckDie();
+       InitializeDisabledCommands(Config->DisabledCommands, this);
        stats->BoundPortCount = BindPorts(true);
 
        for(int t = 0; t < 255; t++)
@@ -322,7 +324,9 @@ InspIRCd::InspIRCd(int argc, char** argv)
        /* Because of limitations in kqueue on freebsd, we must fork BEFORE we
         * initialize the socket engine.
         */
-       SE = new SocketEngine();
+       SocketEngineFactory* SEF = new SocketEngineFactory();
+       SE = SEF->Create();
+       delete SEF;
 
        /* We must load the modules AFTER initializing the socket engine, now */
 
@@ -919,7 +923,7 @@ int InspIRCd::Run()
        /* Add the listening sockets used for client inbound connections
         * to the socket engine
         */
-       for (int count = 0; count < stats->BoundPortCount; count++)
+       for (unsigned long count = 0; count < stats->BoundPortCount; count++)
                SE->AddFd(Config->openSockfd[count],true,X_LISTEN);
 
        this->WritePID(Config->PID);
@@ -963,7 +967,7 @@ int main(int argc, char** argv)
         * Token 0 = 'AAAAAAA'
         * String: ''
         * NumItems = 0
-        */
+        *
        std::string a = "PRIVMSG #test FOO BAR";
        printf("String: '%s'\n",a.c_str());
        irc::tokenstream test(a);
@@ -971,6 +975,7 @@ int main(int argc, char** argv)
        printf("Token 1 = '%s'\n",test.GetToken().c_str());
        printf("Token 2 = '%s'\n",test.GetToken().c_str());
        printf("Token 3 = '%s'\n",test.GetToken().c_str());
+       printf("Token 4 = '%s'\n",test.GetToken().c_str());
 
        std::string b = "PRIVMSG #test :FOO BAR BAZ";
        printf("String: '%s'\n",b.c_str());
@@ -978,6 +983,7 @@ int main(int argc, char** argv)
        printf("Token 0 = '%s'\n",test2.GetToken().c_str());
        printf("Token 1 = '%s'\n",test2.GetToken().c_str());
        printf("Token 2 = '%s'\n",test2.GetToken().c_str());
+       printf("Token 3 = '%s'\n",test2.GetToken().c_str());
 
        std::string c = ":PRIVMSG #test :FOO BAR BAZ";
        printf("String: '%s'\n",c.c_str());
@@ -988,6 +994,7 @@ int main(int argc, char** argv)
        printf("String: '%s'\n",c.c_str());
        irc::tokenstream test4(c);
        printf("Token 0 = '%s'\n",test4.GetToken().c_str());
+       printf("Token 1 = '%s'\n",test4.GetToken().c_str());
 
        c = "";
        printf("String: '%s'\n",c.c_str());
@@ -995,7 +1002,7 @@ int main(int argc, char** argv)
        printf("Token 0 = '%s'\n",test5.GetToken().c_str());
 
        exit(0);
-       
+       */
        try
        {
                ServerInstance = new InspIRCd(argc, argv);