X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fconfigreader.h;h=5c8a663070887c1ac3f0b204880d2e15fb625a14;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=79384c2dbc8f2839833195266d674fe6869fad2f;hpb=f0680338833dd76966ba1769980abb9eafb50467;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/configreader.h b/include/configreader.h index 79384c2db..5c8a66307 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -25,8 +25,11 @@ #include "inspircd.h" #include "globals.h" #include "modules.h" +#include "socketengine.h" +#include "socket.h" class ServerConfig; +class InspIRCd; typedef bool (*Validator)(ServerConfig* conf, const char*, const char*, void*); typedef bool (*MultiValidator)(ServerConfig* conf, const char*, char**, void**, int*); @@ -61,6 +64,8 @@ struct MultiConfig class ServerConfig : public Extensible { private: + InspIRCd* ServerInstance; + /** This variable holds the names of all * files included from the main one. This * is used to make sure that no files are @@ -81,6 +86,8 @@ class ServerConfig : public Extensible bool CheckOnce(char* tag, bool bail, userrec* user); public: + + InspIRCd* GetInstance(); /** This holds all the information in the config file, * it's indexed by tag name to a vector of key/values. @@ -305,7 +312,7 @@ class ServerConfig : public Extensible /** A list of the file descriptors for the listening client ports */ - int openSockfd[MAX_DESCRIPTORS]; + ListenSocket* openSockfd[255]; /** Boolean sets of which modules implement which functions */ @@ -354,10 +361,14 @@ class ServerConfig : public Extensible */ bool SyntaxHints; - ServerConfig(); + /** If set to true, users appear to quit then rejoin when their hosts change. + * This keeps clients synchronized properly. + */ + bool CycleHosts; + + ServerConfig(InspIRCd* Instance); - /** Clears the include stack in preperation for - * a Read() call. + /** Clears the include stack in preperation for a Read() call. */ void ClearStack(); @@ -402,6 +413,12 @@ class ServerConfig : public Extensible Module* GetIOHook(int port); bool AddIOHook(int port, Module* iomod); bool DelIOHook(int port); + + static std::string GetFullProgDir(char** argv, int argc); + static bool DirValid(const char* dirandfile); + static char* CleanFilename(char* name); + static bool FileExists(const char* file); + }; bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance);