]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Automatic detection and allocation of max fds. No longer needs recompile to change...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index bf103328d5c2f3ce4e6c9477cc747a8735cf3ebb..f7f96983572db3da85afb4d8d3b832943ba0398e 100644 (file)
@@ -509,17 +509,14 @@ InspIRCd::InspIRCd(int argc, char** argv)
                Config->sid[2] = (char)(sid % 10 + 48);
        }
 
-       this->InitialiseUID();
-
        /* set up fake client again this time with the correct uid */
-       this->FakeClient = new User(this);
+       this->FakeClient = new User(this, "#INVALID");
        this->FakeClient->SetFd(FD_MAGIC_NUMBER);
 
        // Get XLine to do it's thing.
        this->XLines->CheckELines();
        this->XLines->ApplyLines();
 
-
        CheckDie();
        int bounditems = BindPorts(true, found_ports, pl);
 
@@ -584,28 +581,12 @@ InspIRCd::InspIRCd(int argc, char** argv)
        }
 #endif
 
-       printf("\nInspIRCd is now running as '%s'[%s]\n", Config->ServerName,Config->GetSID().c_str());
-       Logs->Log("STARTUP", DEFAULT, "Startup complete as '%s'[%s]", Config->ServerName,Config->GetSID().c_str());
+       printf("\nInspIRCd is now running as '%s'[%s] with %d max open sockets\n", Config->ServerName,Config->GetSID().c_str(), SE->GetMaxFds());
+       Logs->Log("STARTUP", DEFAULT, "Startup complete as '%s'[%s], %d max open sockets", Config->ServerName,Config->GetSID().c_str(), SE->GetMaxFds());
 
        this->WritePID(Config->PID);
 }
 
-/* moved to a function, as UID generation can call this also */
-void InspIRCd::InitialiseUID()
-{
-       int i = 3;
-
-       current_uid[0] = Config->sid[0];
-       current_uid[1] = Config->sid[1];
-       current_uid[2] = Config->sid[2];
-
-       /* Initialise UID */
-       for(i = 3; i < UUID_LENGTH - 1; i++)
-               current_uid[i] = 'A';
-
-       current_uid[UUID_LENGTH] = '\0';
-}
-
 int InspIRCd::Run()
 {
        /* See if we're supposed to be running the test suite rather than entering the mainloop */