]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Move all of the xline stuff into class XLineManager, make an instance of it in class...
[user/henk/code/inspircd.git] / src / configreader.cpp
index 85745c63e4bef95156645c33f5b10eea48ea6c12..b57de169214fb9d2ad672b30ed6bc5925cba07f7 100644 (file)
 #include "userprocess.h"
 #include "xline.h"
 
-extern time_t TIME;
-
-extern int MODCOUNT;
-extern std::vector<Module*> modules;
-extern std::vector<ircd_module*> factory;
-
-using irc::sockets::BindPorts;
-
 std::vector<std::string> old_module_names, new_module_names, added_modules, removed_modules;
 
 ServerConfig::ServerConfig(InspIRCd* Instance) : ServerInstance(Instance)
@@ -103,7 +95,7 @@ bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user)
                if (bail)
                {
                        printf("There were errors in your configuration:\nYou have more than one <%s> tag, this is not permitted.\n",tag);
-                       Exit(0);
+                       InspIRCd::Exit(ERROR);
                }
                else
                {
@@ -125,7 +117,7 @@ bool ServerConfig::CheckOnce(char* tag, bool bail, userrec* user)
                if (bail)
                {
                        printf("There were errors in your configuration:\nYou have not defined a <%s> tag, this is required.\n",tag);
-                       Exit(0);
+                       InspIRCd::Exit(ERROR);
                }
                else
                {
@@ -668,7 +660,7 @@ void ServerConfig::Read(bool bail, userrec* user)
                {
                        /* Unneeded because of the log() aboive? */
                        printf("There were errors in your configuration:\n%s",errstr.str().c_str());
-                       Exit(0);
+                       InspIRCd::Exit(ERROR);
                }
                else
                {
@@ -800,7 +792,7 @@ void ServerConfig::Read(bool bail, userrec* user)
         */
        if (!bail)
        {
-               ServerInstance->stats->BoundPortCount = BindPorts(false);
+               ServerInstance->stats->BoundPortCount = ServerInstance->BindPorts(false);
 
                if (!removed_modules.empty())
                        for (std::vector<std::string>::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++)
@@ -1432,4 +1424,8 @@ std::string ServerConfig::GetFullProgDir(char** argv, int argc)
        return otherdir;
 }
 
+InspIRCd* ServerConfig::GetInstance()
+{
+       return ServerInstance;
+}