]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Introduce ModeProcessFlags, can be passed to ModeParser::Process() to indicate local...
[user/henk/code/inspircd.git] / include / configreader.h
index a2dfd2a34777b5841c1f3705500a89ce310483a8..a17c5cf3eb294223ca2115e02ee33c3318c96f5f 100644 (file)
@@ -93,14 +93,16 @@ class ServerLimits
        size_t MaxGecos;
        /** Maximum away message length */
        size_t MaxAway;
+       /** Maximum line length */
+       size_t MaxLine;
 
        /** Creating the class initialises it to the defaults
         * as in 1.1's ./configure script. Reading other values
         * from the config will change these values.
         */
-       ServerLimits() : NickMax(31), ChanMax(64), MaxModes(20), IdentMax(12), MaxQuit(255), MaxTopic(307), MaxKick(255), MaxGecos(128), MaxAway(200)
-       {
-       }
+       ServerLimits() : NickMax(31), ChanMax(64), MaxModes(20), IdentMax(12),
+               MaxQuit(255), MaxTopic(307), MaxKick(255), MaxGecos(128), MaxAway(200),
+               MaxLine(512) { }
 };
 
 struct CommandLineConf
@@ -142,8 +144,6 @@ struct CommandLineConf
        /** Saved argv from startup
         */
        char** argv;
-
-       std::string startup_log;
 };
 
 class CoreExport OperInfo : public refcountbase
@@ -170,11 +170,6 @@ class CoreExport OperInfo : public refcountbase
        /** Get a configuration item, searching in the oper, type, and class blocks (in that order) */
        std::string getConfig(const std::string& key);
        void init();
-
-       inline const char* NameStr()
-       {
-               return irc::Spacify(name.c_str());
-       }
 };
 
 /** This class holds the bulk of the runtime configuration for the ircd.
@@ -320,10 +315,6 @@ class CoreExport ServerConfig
         */
        std::string FixedPart;
 
-       /** The DNS server to use for DNS queries
-        */
-       std::string DNSServer;
-
        /** Pretend disabled commands don't exist.
         */
        bool DisabledDontExist;
@@ -448,10 +439,6 @@ class CoreExport ServerConfig
         */
        std::map<irc::string, bool> ulines;
 
-       /** If set to true, no user DNS lookups are to be performed
-        */
-       bool NoUserDns;
-
        /** If set to true, provide syntax hints for unknown commands
         */
        bool SyntaxHints;
@@ -502,7 +489,7 @@ class CoreExport ServerConfig
 
        /** Get server ID as string with required leading zeroes
         */
-       const std::string& GetSID();
+       const std::string& GetSID() const { return sid; }
 
        /** Read the entire configuration into memory
         * and initialize this class. All other methods
@@ -534,6 +521,12 @@ class CoreExport ServerConfig
         * @return True if the file exists and is readable.
         */
        static bool FileExists(const char* file);
+       
+       /** Escapes a value for storage in a configuration key.
+        * @param str The string to escape.
+        * @param xml Are we using the XML config format?
+        */
+       static std::string Escape(const std::string& str, bool xml = true);
 
        /** If this value is true, invites will bypass more than just +i
         */