]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Change SWHOIS to OPTCOMMON, remove m_operinvex
[user/henk/code/inspircd.git] / include / configreader.h
index c8cd13081d82c553a4c1b51f98ae7639bdfcbcf9..28138edd65f537443cd31bbd2852c3cf85a3a216 100644 (file)
@@ -19,7 +19,7 @@
 /** Determines if a channel op is exempt from given mode m,
  * in config of server instance s.
  */
-#define CHANOPS_EXEMPT(s, m) (s->Config->ExemptChanOps[(unsigned char)m])
+#define CHANOPS_EXEMPT(m) (ServerInstance->Config->ExemptChanOps[(unsigned char)m])
 
 #include <sstream>
 #include <string>
@@ -122,10 +122,6 @@ class ServerLimits
 class CoreExport ServerConfig : public classbase
 {
   private:
-       /** Creator/owner pointer
-        */
-       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
@@ -140,7 +136,7 @@ class CoreExport ServerConfig : public classbase
         * configutation, appending errors to errorstream
         * and setting error if an error has occured.
         */
-       bool ParseLine(const std::string &filename, std::string &line, long &linenumber);
+       bool ParseLine(const std::string &filename, std::string &line, long &linenumber, bool allowexeinc);
 
        /** Check that there is only one of each configuration item
         */
@@ -156,7 +152,7 @@ class CoreExport ServerConfig : public classbase
 
        /** Process an include file directive
         */
-       bool DoInclude(const std::string &file);
+       bool DoInclude(const std::string &file, bool allowexeinc);
 
        /** Error stream, contains error output from any failed configuration parsing.
         */
@@ -172,10 +168,6 @@ class CoreExport ServerConfig : public classbase
        /** Used to indicate who we announce invites to on a channel */
        enum InviteAnnounceState { INVITE_ANNOUNCE_NONE, INVITE_ANNOUNCE_ALL, INVITE_ANNOUNCE_OPS, INVITE_ANNOUNCE_DYNAMIC };
 
-       /** Returns the creator InspIRCd pointer
-        */
-       InspIRCd* GetInstance();
-
        /** Not used any more as it is named, can probably be removed or renamed.
         */
        int DoDownloads();
@@ -582,7 +574,7 @@ class CoreExport ServerConfig : public classbase
 
        /** Construct a new ServerConfig
         */
-       ServerConfig(InspIRCd* Instance);
+       ServerConfig();
 
        /** Get server ID as string with required leading zeroes
         */
@@ -618,12 +610,12 @@ class CoreExport ServerConfig : public classbase
        /** Load 'filename' into 'target', with the new config parser everything is parsed into
         * tag/key/value at load-time rather than at read-value time.
         */
-       bool LoadConf(FILE* &conf, const char* filename);
+       bool LoadConf(FILE* &conf, const char* filename, bool allowexeinc);
 
        /** Load 'filename' into 'target', with the new config parser everything is parsed into
         * tag/key/value at load-time rather than at read-value time.
         */
-       bool LoadConf(FILE* &conf, const std::string &filename);
+       bool LoadConf(FILE* &conf, const std::string &filename, bool allowexeinc);
 
        /** Writes 'length' chars into 'result' as a string
         */
@@ -698,7 +690,7 @@ class CoreExport ServerConfig : public classbase
         * @param name Directory to tidy
         * @return The cleaned filename
         */
-       static char* CleanFilename(char* name);
+       static const char* CleanFilename(const char* name);
 
        /** Check if a file exists.
         * @param file The full path to a file