From ff3d213e5f57fcf45881fde812c04484ee4cd359 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 3 Dec 2006 01:20:41 +0000 Subject: [PATCH] Fix , 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 --- src/configreader.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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} }; -- 2.39.2