summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-03 01:20:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-03 01:20:41 +0000
commitff3d213e5f57fcf45881fde812c04484ee4cd359 (patch)
tree6a6f8faf1308ee6f56881927fb7a4feb0c0b4b60
parent68a602a33e225de22fad103b7459ad7ff59f9a15 (diff)
Fix <die:value>, its been broken for quite some time. (whoops *hide*)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5832 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 8ba199686..eba798a56 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -308,6 +308,17 @@ bool ValidateRules(ServerConfig* conf, const char* tag, const char* value, Value
return true;
}
+bool ValidateDie(ServerConfig* conf, const char* tag, const char* value, ValueItem &data)
+{
+ if (!*data.GetString())
+ {
+ conf->GetInstance()->Log(DEFAULT,"Die value is set: \"%s\", terminating.", data.GetString());
+ printf("\n\nERROR: %s\n\n", data.GetString());
+ exit(ERROR);
+ }
+ return true;
+}
+
bool ValidateWhoWas(ServerConfig* conf, const char* tag, const char* value, ValueItem &data)
{
conf->WhoWasMaxKeep = conf->GetInstance()->Duration(data.GetString());
@@ -564,6 +575,7 @@ void ServerConfig::Read(bool bail, userrec* user)
{"whowas", "groupsize", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation},
{"whowas", "maxgroups", new ValueContainerInt (&this->WhoWasMaxGroups), DT_INTEGER, NoValidation},
{"whowas", "maxkeep", new ValueContainerChar (maxkeep), DT_CHARPTR, ValidateWhoWas},
+ {"die", "value", new ValueContainerChar (this->DieValue), DT_CHARPTR, ValidateDie},
{NULL}
};