diff options
author | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-26 19:57:52 +0000 |
---|---|---|
committer | Naram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-10-26 19:57:52 +0000 |
commit | 4e99df540826b6270100eea12f01d0dd6af65fbd (patch) | |
tree | 5cde86731c012a10ae4c71f4b2456adf7b029b08 | |
parent | 314dbcd67e7c3f333abb7a4522e0adab6ed2b47f (diff) |
Added defaultsessionlimit directive to operserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1482 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | data/example_new.conf | 7 | ||||
-rw-r--r-- | src/config.c | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index d9a0cd52e..05ac2cc16 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -800,4 +800,11 @@ operserv * This directive is optional. */ limitsessions = yes + + /* + * Default session limit per host. Once a host reaches it's session limit, all clients attempting + * to connect from that host will be killed. A value of zero means an unlimited session limit. + * If not given and session limiting is enabled, it will default to no limit. + */ + defaultsessionlimit = 3 } diff --git a/src/config.c b/src/config.c index 423d504ab..146a6a58e 100644 --- a/src/config.c +++ b/src/config.c @@ -659,6 +659,7 @@ int ServerConfig::Read(bool bail) {"operserv", "disableraw", "no", new ValueContainerBool(&DisableRaw), DT_BOOLEAN, NoValidation}, {"operserv", "notifications", "", new ValueContainerString(&OSNotifications), DT_STRING, NoValidation}, {"operserv", "limitsessions", "no", new ValueContainerBool(&LimitSessions), DT_BOOLEAN, NoValidation}, + {"operserv", "defaultsessionlimit", "0", new ValueContainerInt(&DefSessionLimit), DT_INTEGER, NoValidation}, {NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation} }; /* These tags can occur multiple times, and therefore they have special code to read them @@ -1236,7 +1237,6 @@ Directive directives[] = { {"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}}, {"BotCoreModules", {{PARAM_STRING, PARAM_RELOAD, &BotCoreModules}}}, {"ChanCoreModules", {{PARAM_STRING, PARAM_RELOAD, &ChanCoreModules}}}, - {"DefSessionLimit", {{PARAM_POSINT, 0, &DefSessionLimit}}}, {"DontQuoteAddresses", {{PARAM_SET, PARAM_RELOAD, &DontQuoteAddresses}}}, {"DumpCore", {{PARAM_SET, 0, &DumpCore}}}, @@ -1881,7 +1881,6 @@ int read_config(int reload) if (LimitSessions) { - CHECK(DefSessionLimit); CHECK(MaxSessionLimit); CHECK(ExceptionExpiry); |