summaryrefslogtreecommitdiff
path: root/include/configreader.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-25 17:30:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-25 17:30:43 +0000
commit7d7250484c352c13830e63ae41ee8faae40a9bd5 (patch)
tree0fdf4941b4d72469a18eec97506f06f6e94e86e9 /include/configreader.h
parente7b837ec5f120f928a0dc321fa918bdd01ab0c02 (diff)
First phase of conversion to dynamic limits on all the lengths, configured via the <limits> tag
(the tag isnt there yet, these all just run on defaults in the class constructor) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9802 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/configreader.h')
-rw-r--r--include/configreader.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 7fc60203d..56a2ee698 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -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;