summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-19 19:44:53 +0000
committerNaram Qashat cyberbotx@cyberbotx.com <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>2008-10-19 19:44:53 +0000
commitf91f5005e42f9809359c90e46c426f4116fcbf5f (patch)
tree276967b17cca8e9a75c9eb071bd9f5af30360641 /src/config.c
parent9432f3f0e8e4e1d20123a58012f51d832b737293 (diff)
Added database directive to botserv block in new config.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1452 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/config.c b/src/config.c
index 63f969d4a..c822ec990 100644
--- a/src/config.c
+++ b/src/config.c
@@ -486,7 +486,7 @@ bool ValidateBantype(ServerConfig *, const char *, const char *, ValueItem &data
bool ValidateBotServ(ServerConfig *, const char *tag, const char *value, ValueItem &data)
{
if (s_BotServ) {
- if (static_cast<std::string>(value) == "description") {
+ if (static_cast<std::string>(value) == "description" || static_cast<std::string>(value) == "database") {
if (!*data.GetString()) throw ConfigException(static_cast<std::string>("The value for <") + tag + ":" + value + "> cannot be empty when BotServ is enabled!");
}
}
@@ -612,6 +612,7 @@ int ServerConfig::Read(bool bail)
{"memoserv", "memoreceipt", "0", new ValueContainerInt(&MSMemoReceipt), DT_INTEGER, NoValidation},
{"botserv", "nick", "", new ValueContainerChar(&s_BotServ), DT_CHARPTR, NoValidation},
{"botserv", "description", "Bot Service", new ValueContainerChar(&desc_BotServ), DT_CHARPTR, ValidateBotServ},
+ {"botserv", "database", "bot.db", new ValueContainerChar(&BotDBName), DT_CHARPTR, ValidateBotServ},
{NULL, NULL, NULL, NULL, DT_NOTHING, NoValidation}
};
/* These tags can occur multiple times, and therefore they have special code to read them
@@ -1192,7 +1193,6 @@ Directive directives[] = {
{"BadPassLimit", {{PARAM_POSINT, PARAM_RELOAD, &BadPassLimit}}},
{"BadPassTimeout", {{PARAM_TIME, PARAM_RELOAD, &BadPassTimeout}}},
{"BotCoreModules", {{PARAM_STRING, PARAM_RELOAD, &BotCoreModules}}},
- {"BotServDB", {{PARAM_STRING, PARAM_RELOAD, &BotDBName}}},
{"BSBadWordsMax", {{PARAM_POSINT, PARAM_RELOAD, &BSBadWordsMax}}},
{"BSDefDontKickOps", {{PARAM_SET, PARAM_RELOAD, &BSDefDontKickOps}}},
{"BSDefDontKickVoices",
@@ -1899,7 +1899,6 @@ int read_config(int reload)
}
if (s_BotServ) {
- CHEK2(BotDBName, BotServDB);
CHECK(BSBadWordsMax);
CHECK(BSMinUsers);
CHECK(BSKeepData);