summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c4
-rw-r--r--src/main.c2
-rw-r--r--src/operserv.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c
index 74815f393..fc0c4c6cd 100644
--- a/src/config.c
+++ b/src/config.c
@@ -285,7 +285,7 @@ static std::string DefCon2;
static std::string DefCon3;
static std::string DefCon4;
int DefCon[6];
-char *DefConTimeOut;
+time_t DefConTimeOut;
int DefConSessionLimit;
time_t DefConAKILL;
char *DefConChanModes;
@@ -703,6 +703,7 @@ int ServerConfig::Read(bool bail)
{"defcon", "sessionlimit", "0", new ValueContainerInt(&DefConSessionLimit), DT_INTEGER, ValidateDefCon},
{"defcon", "akillexpire", "0", new ValueContainerTime(&DefConAKILL), DT_TIME, ValidateDefCon},
{"defcon", "chanmodes", "", new ValueContainerChar(&DefConChanModes), DT_CHARPTR, ValidateDefCon},
+ {"defcon", "timeout", "0", new ValueContainerTime(&DefConTimeOut), 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
@@ -1283,7 +1284,6 @@ Directive directives[] = {
{"DontQuoteAddresses",
{{PARAM_SET, PARAM_RELOAD, &DontQuoteAddresses}}},
{"DumpCore", {{PARAM_SET, 0, &DumpCore}}},
- {"DefConTimeOut", {{PARAM_STRING, PARAM_RELOAD, &DefConTimeOut}}},
{"DefConAkillReason",
{{PARAM_STRING, PARAM_RELOAD, &DefConAkillReason}}},
{"DefConOffMessage",
diff --git a/src/main.c b/src/main.c
index 60a9ce8bf..d70e936ba 100644
--- a/src/main.c
+++ b/src/main.c
@@ -591,7 +591,7 @@ int main(int ac, char **av, char **envp)
last_update = t;
}
- if ((DefConTimeOut) && (t - last_DefCon >= dotime(DefConTimeOut))) {
+ if ((DefConTimeOut) && (t - last_DefCon >= DefConTimeOut)) {
resetDefCon(5);
last_DefCon = t;
}
diff --git a/src/operserv.c b/src/operserv.c
index 20ff4f28e..50e3e078c 100644
--- a/src/operserv.c
+++ b/src/operserv.c
@@ -1594,7 +1594,7 @@ void resetDefCon(int level)
snprintf(strLevel, 4, "%d", level);
if (DefConLevel != level) {
if ((DefContimer)
- && (time(NULL) - DefContimer >= dotime(DefConTimeOut))) {
+ && (time(NULL) - DefContimer >= DefConTimeOut)) {
DefConLevel = level;
send_event(EVENT_DEFCON_LEVEL, 1, strLevel);
alog("Defcon level timeout, returning to lvl %d", level);