]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
First phase of conversion to dynamic limits on all the lengths, configured via the...
[user/henk/code/inspircd.git] / include / configreader.h
index 7fc60203d9116b736798206744722a35b648c74d..56a2ee6988185d3b82894acb9dbb2d573e251514 100644 (file)
@@ -226,6 +226,28 @@ struct operclass_data : public Extensible
 typedef std::map<irc::string, operclass_data> operclass_t;
 
 
+class ServerLimits : public Extensible
+{
+ public:
+       size_t NickMax;
+       size_t ChanMax;
+       size_t MaxModes;
+       size_t IdentMax;
+       size_t MaxQuit;
+       size_t MaxTopic;
+       size_t MaxKick;
+       size_t MaxGecos;
+       size_t MaxAway;
+
+       /* 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)
+       {
+       }
+};
+
 /** This class holds the bulk of the runtime configuration for the ircd.
  * It allows for reading new config values, accessing configuration files,
  * and storage of the configuration data needed to run the ircd, such as
@@ -275,11 +297,6 @@ class CoreExport ServerConfig : public Extensible
 
        std::map<std::string, std::istream*> IncludedFiles;
 
-       std::map<std::string, bool> CompletedFiles;
-
-       size_t TotalDownloaded;
-       size_t FileErrors;
-
        /** 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 };
 
@@ -295,6 +312,8 @@ class CoreExport ServerConfig : public Extensible
         */
        ConfigDataHash config_data;
 
+       ServerLimits Limits;
+
        /** Max number of WhoWas entries per user.
         */
        int WhoWasGroupSize;