diff options
-rw-r--r-- | data/example_new.conf | 15 | ||||
-rw-r--r-- | include/extern.h | 4 | ||||
-rw-r--r-- | src/config.c | 8 |
3 files changed, 21 insertions, 6 deletions
diff --git a/data/example_new.conf b/data/example_new.conf index 19d79111b..fb1b2d2de 100644 --- a/data/example_new.conf +++ b/data/example_new.conf @@ -390,6 +390,21 @@ options { * be used with Anope. */ #usestrictprivmsg = yes + + /* + * If set, Anope will dump core when a segmentation fault occurs. This is + * generally not needed, but if Anope is crashing on your network and you + * want to make a bug report, having a core file may be of great help. + * This directive is optional. + */ + #dumpcore = yes + + /* + * If set, Anope will log user connections, disconnections, and nickname + * changes. You may have to do so in case you ever need to transmit user + * information to your local authorities. This directive is optional. + */ + #logusers = yes } /* diff --git a/include/extern.h b/include/extern.h index c37a1c86d..0288ab7ba 100644 --- a/include/extern.h +++ b/include/extern.h @@ -297,8 +297,8 @@ E int KeepBackups; E bool ForceForbidReason; E bool UsePrivmsg; E bool UseStrictPrivMsg; -E int DumpCore; -E int LogUsers; +E bool DumpCore; +E bool LogUsers; E int NickRegDelay; E int UseSVSHOLD; E int RestrictOperNicks; diff --git a/src/config.c b/src/config.c index 4680c949b..46cdb9540 100644 --- a/src/config.c +++ b/src/config.c @@ -99,8 +99,8 @@ int KeepBackups; bool ForceForbidReason; bool UsePrivmsg; bool UseStrictPrivMsg; -int DumpCore; -int LogUsers; +bool DumpCore; +bool LogUsers; int NickRegDelay; int UseSVSHOLD; int NewsCount; @@ -652,6 +652,8 @@ int ServerConfig::Read(bool bail) {"options", "forceforbidreason", "no", new ValueContainerBool(&ForceForbidReason), DT_BOOLEAN, NoValidation}, {"options", "useprivmsg", "no", new ValueContainerBool(&UsePrivmsg), DT_BOOLEAN, NoValidation}, {"options", "usestrictprivmsg", "no", new ValueContainerBool(&UseStrictPrivMsg), DT_BOOLEAN, NoValidation}, + {"options", "dumpcore", "no", new ValueContainerBool(&DumpCore), DT_BOOLEAN | DT_NORELOAD, NoValidation}, + {"options", "logusers", "no", new ValueContainerBool(&LogUsers), DT_BOOLEAN, NoValidation}, {"nickserv", "nick", "NickServ", new ValueContainerChar(&s_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "description", "Nickname Registration Service", new ValueContainerChar(&desc_NickServ), DT_CHARPTR | DT_NORELOAD, ValidateNotEmpty}, {"nickserv", "database", "nick.db", new ValueContainerChar(&NickDBName), DT_CHARPTR, ValidateNotEmpty}, @@ -1363,10 +1365,8 @@ bool ValueItem::GetBool() /*************************************************************************/ Directive directives[] = { - {"DumpCore", {{PARAM_SET, 0, &DumpCore}}}, {"LocalAddress", {{PARAM_STRING, 0, &LocalHost}, {PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}}, - {"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}}, {"MysqlHost", {{PARAM_STRING, PARAM_RELOAD, &MysqlHost}}}, {"MysqlUser", {{PARAM_STRING, PARAM_RELOAD, &MysqlUser}}}, {"MysqlPass", {{PARAM_STRING, PARAM_RELOAD, &MysqlPass}}}, |