summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example_new.conf6
-rw-r--r--include/extern.h2
-rw-r--r--src/config.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/data/example_new.conf b/data/example_new.conf
index 9345a620e..44f08f00d 100644
--- a/data/example_new.conf
+++ b/data/example_new.conf
@@ -708,4 +708,10 @@ operserv
* users' modes, etc. This directive is optional.
*/
#superadmin = yes
+
+ /*
+ * If set, causes Services to write a message to the log every time a new user maximum is set.
+ * This directive is optional.
+ */
+ logmaxusers = yes
}
diff --git a/include/extern.h b/include/extern.h
index 99e5e9130..abf1390d7 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -375,7 +375,7 @@ E char *GlobalOnCycleMessage;
E char *GlobalOnCycleUP;
E char **ServicesRoots;
E int RootNumber;
-E int LogMaxUsers;
+E bool LogMaxUsers;
E bool SuperAdmin;
E int LogBot;
E int AutokillExpiry;
diff --git a/src/config.c b/src/config.c
index 5813d825d..2af02f061 100644
--- a/src/config.c
+++ b/src/config.c
@@ -182,7 +182,7 @@ char **ServicesRoots;
int RootNumber;
bool SuperAdmin;
int LogBot;
-int LogMaxUsers;
+bool LogMaxUsers;
int DisableRaw;
int AutokillExpiry;
int ChankillExpiry;
@@ -646,6 +646,7 @@ int ServerConfig::Read(bool bail)
{"operserv", "autokilldatabase", "akill.db", new ValueContainerChar(&AutokillDBName), DT_CHARPTR, ValidateNotEmpty},
{"operserv", "servicesroot", "", new ValueContainerChar(&ServicesRoot), DT_CHARPTR, ValidateNotEmpty},
{"operserv", "superadmin", "no", new ValueContainerBool(&SuperAdmin), DT_BOOLEAN, NoValidation},
+ {"operserv", "logmaxusers", "no", new ValueContainerBool(&LogMaxUsers), DT_BOOLEAN, NoValidation},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1263,7 +1264,6 @@ Directive directives[] = {
{"LocalAddress", {{PARAM_STRING, 0, &LocalHost},
{PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}},
{"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}},
- {"LogMaxUsers", {{PARAM_SET, PARAM_RELOAD, &LogMaxUsers}}},
{"MailDelay", {{PARAM_TIME, PARAM_RELOAD, &MailDelay}}},
{"MaxSessionKill", {{PARAM_INT, PARAM_RELOAD, &MaxSessionKill}}},
{"MaxSessionLimit", {{PARAM_POSINT, PARAM_RELOAD, &MaxSessionLimit}}},