summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-26 20:24:04 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-26 20:24:04 +0000
commit495d5e534cacd4a0aade9c800c76a56430231a94 (patch)
treeba102a598106c2bcd7a47444119d890c36a3cfb7
parentd908d37ada94d5cc4aa9644c1e3f032ac6cf7351 (diff)
Added sessionautokillexpiry directive to operserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1488 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c5
3 files changed, 9 insertions, 4 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index df3ae5fa8..9de4816fa 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -845,4 +845,10 @@ operserv
* directive is optional.
*/
maxsessionkill = 15
+
+ /*
+ * Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit. This
+ * directive is optional, if not set, defaults to 30 minutes.
+ */
+ sessionautokillexpiry = 30m
}
diff --git a/include/extern.h b/include/extern.h
index da3ba3faf..e481f55cc 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -447,7 +447,7 @@ E int DefSessionLimit;
E time_t ExceptionExpiry;
E int MaxSessionKill;
E int MaxSessionLimit;
-E int SessionAutoKillExpiry;
+E time_t SessionAutoKillExpiry;
E char *ExceptionDBName;
E char *SessionLimitDetailsLoc;
E char *SessionLimitExceeded;
diff --git a/src/config.c b/src/config.c
index 3e979370f..33e61fbdc 100644
--- a/src/config.c
+++ b/src/config.c
@@ -222,7 +222,7 @@ int DefSessionLimit;
time_t ExceptionExpiry;
int MaxSessionKill;
int MaxSessionLimit;
-int SessionAutoKillExpiry;
+time_t SessionAutoKillExpiry;
char *ExceptionDBName;
char *SessionLimitExceeded;
char *SessionLimitDetailsLoc;
@@ -675,6 +675,7 @@ int ServerConfig::Read(bool bail)
{"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},
+ {"operserv", "sessionautokillexpiry", "0", new ValueContainerTime(&SessionAutoKillExpiry), DT_TIME, NoValidation},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1323,8 +1324,6 @@ Directive directives[] = {
{"ServerName", {{PARAM_STRING, 0, &ServerName}}},
{"ServiceUser", {{PARAM_STRING, 0, &temp_userhost}}},
{"OSOpersOnly", {{PARAM_SET, PARAM_RELOAD, &OSOpersOnly}}},
- {"SessionAutoKillExpiry",
- {{PARAM_TIME, PARAM_RELOAD, &SessionAutoKillExpiry}}},
{"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},
{"GlobalOnCycle", {{PARAM_SET, PARAM_RELOAD, &GlobalOnCycle}}},
{"AnonymousGlobal", {{PARAM_SET, PARAM_RELOAD, &AnonymousGlobal}}},