1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 06:46:38 +02:00

Added maxsessionkill directive to operserv block in new config.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1487 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Naram Qashat cyberbotx@cyberbotx.com
2008-10-26 20:19:28 +00:00
parent fd1c741087
commit d908d37ada
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -838,4 +838,11 @@ operserv
* regarding session limits.
*/
#sessionlimitdetailsloc = "Please visit http://your.website.url/ for more information about session limits."
/*
* If set and is not 0, this directive tells Services to add an AKILL the number of subsequent kills
* for the same host exceeds this value, preventing the network from experiencing KILL floods. This
* directive is optional.
*/
maxsessionkill = 15
}
+2 -2
View File
@@ -674,6 +674,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "exceptionexpiry", "0", new ValueContainerTime(&ExceptionExpiry), DT_TIME, ValidateLimitSessions},
{"operserv", "sessionlimitexceeded", "", new ValueContainerChar(&SessionLimitExceeded), DT_CHARPTR, NoValidation},
{"operserv", "sessionlimitdetailsloc", "", new ValueContainerChar(&SessionLimitDetailsLoc), DT_CHARPTR, NoValidation},
{"operserv", "maxsessionkill", "0", new ValueContainerInt(&MaxSessionKill), 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
@@ -1283,7 +1284,6 @@ Directive directives[] = {
{PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}},
{"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}},
{"MailDelay", {{PARAM_TIME, PARAM_RELOAD, &MailDelay}}},
{"MaxSessionKill", {{PARAM_INT, PARAM_RELOAD, &MaxSessionKill}}},
{"MemoCoreModules", {{PARAM_STRING, PARAM_RELOAD, &MemoCoreModules}}},
{"MysqlHost", {{PARAM_STRING, PARAM_RELOAD, &MysqlHost}}},
{"MysqlUser", {{PARAM_STRING, PARAM_RELOAD, &MysqlUser}}},
@@ -1890,7 +1890,7 @@ int read_config(int reload)
if (LimitSessions) {
if (MaxSessionKill && !SessionAutoKillExpiry)
SessionAutoKillExpiry = 30 * 60; /* 30 minutes */
SessionAutoKillExpiry = 1800; /* 30 minutes */
}
if (s_BotServ) {