summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf8
-rw-r--r--src/config.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index ab923b3cd..264378bea 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -819,4 +819,12 @@ operserv
* limiting is enabled.
*/
exceptionexpiry = 1d
+
+ /*
+ * The message that will be NOTICE'd to a user just before they are removed from the network because
+ * their host's session limit has been exceeded. It may be used to give a slightly more descriptive
+ * reason for the impending kill as opposed to simply "Session limit exceeded". This directive is
+ * optional, if not set, nothing will be sent.
+ */
+ sessionlimitexceeded = "The session limit for your host %s has been exceeded."
}
diff --git a/src/config.c b/src/config.c
index c9d7c3852..e41487556 100644
--- a/src/config.c
+++ b/src/config.c
@@ -672,6 +672,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "defaultsessionlimit", "0", new ValueContainerInt(&DefSessionLimit), DT_INTEGER, NoValidation},
{"operserv", "maxsessionlimit", "0", new ValueContainerInt(&MaxSessionLimit), DT_INTEGER, ValidateLimitSessions},
{"operserv", "exceptionexpiry", "0", new ValueContainerTime(&ExceptionExpiry), DT_TIME, ValidateLimitSessions},
+ {"operserv", "sessionlimitexceeded", "", new ValueContainerChar(&SessionLimitExceeded), DT_CHARPTR, 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[] = {
{"SessionLimitDetailsLoc",
{{PARAM_STRING, PARAM_RELOAD, &SessionLimitDetailsLoc}}},
{"OSOpersOnly", {{PARAM_SET, PARAM_RELOAD, &OSOpersOnly}}},
- {"SessionLimitExceeded",
- {{PARAM_STRING, PARAM_RELOAD, &SessionLimitExceeded}}},
{"SessionAutoKillExpiry",
{{PARAM_TIME, PARAM_RELOAD, &SessionAutoKillExpiry}}},
{"HideStatsO", {{PARAM_SET, PARAM_RELOAD, &HideStatsO}}},