]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Add factories for other types
[user/henk/code/inspircd.git] / src / inspircd.cpp
index 77e8f17d988cd8f35f36e250faf4c72be2e39327..2f00b9f2e7cb3e5278a1a3c955ed57d9a9ab26d7 100644 (file)
@@ -11,6 +11,8 @@
  * ---------------------------------------------------
  */
 
+/* $Install: src/inspircd $(BINPATH) */
+
 #include "inspircd.h"
 #include <signal.h>
 
@@ -322,7 +324,14 @@ InspIRCd::InspIRCd(int argc, char** argv)
        this->uuidlist = new user_hash();
        this->chanlist = new chan_hash();
 
+
        this->Config = new ServerConfig(this);
+       this->SNO = new SnomaskManager(this);
+       this->Modules = new ModuleManager(this);
+       this->stats = new serverstats();
+       this->Timers = new TimerManager(this);
+       this->Parser = new CommandParser(this);
+       this->XLines = new XLineManager(this);
 
        this->Config->argv = argv;
        this->Config->argc = argc;
@@ -335,7 +344,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
 
        this->Config->opertypes.clear();
        this->Config->operclass.clear();
-       this->SNO = new SnomaskManager(this);
+
        this->TIME = this->OLDTIME = this->startup_time = time(NULL);
        this->time_delta = 0;
        srand(this->TIME);
@@ -423,16 +432,13 @@ InspIRCd::InspIRCd(int argc, char** argv)
        /* Set the finished argument values */
        Config->nofork = do_nofork;
        Config->forcedebug = do_debug;
-       Config->writelog = !do_nolog;
-
-       this->Modules = new ModuleManager(this);
-       this->stats = new serverstats();
-       this->Timers = new TimerManager(this);
-       this->Parser = new CommandParser(this);
-       this->XLines = new XLineManager(this);
-       
+       Config->writelog = !do_nolog;   
        Config->ClearStack();
        Config->Read(true, NULL);
+
+       // Get XLine to do it's thing.
+       this->XLines->CheckELines(this->XLines->lookup_lines['E']);
+       this->XLines->ApplyLines();
        
        this->Modules->modules.resize(255);
        this->Modules->handles.resize(255);
@@ -696,7 +702,7 @@ void InspIRCd::BufferedSocketCull()
  * An ircd in five lines! bwahahaha. ahahahahaha. ahahah *cough*.
  */
 
-int ircd(int argc, char ** argv)
+int main(int argc, char ** argv)
 {
        SI = new InspIRCd(argc, argv);
        mysig = &SI->s_signal;
@@ -705,21 +711,6 @@ int ircd(int argc, char ** argv)
        return 0;
 }
 
-#ifdef WINDOWS
-
-int main(int argc, char ** argv)
-{
-       ircd(argc,argv);
-       return 0;
-}
-
-#else
-int main(int argc, char** argv)
-{
-       return ircd(argc,argv);
-}
-#endif
-
 /* this returns true when all modules are satisfied that the user should be allowed onto the irc server
  * (until this returns true, a user will block in the waiting state, waiting to connect up to the
  * registration timeout maximum seconds)