summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index c9fa62510..b5d6b3ecb 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -434,7 +434,6 @@ void ServerConfig::Fill()
HideServer = security->getString("hideserver", security->getString("hidewhois"));
HideKillsServer = security->getString("hidekills");
HideULineKills = security->getBool("hideulinekills");
- RestrictBannedUsers = security->getBool("restrictbannedusers", true);
GenericOper = security->getBool("genericoper");
SyntaxHints = options->getBool("syntaxhints");
CycleHostsFromUser = options->getBool("cyclehostsfromuser");
@@ -474,6 +473,16 @@ void ServerConfig::Fill()
ReadXLine(this, "badhost", "host", ServerInstance->XLines->GetFactory("K"));
ReadXLine(this, "exception", "host", ServerInstance->XLines->GetFactory("E"));
+ const std::string restrictbannedusers = options->getString("restrictbannedusers", "yes");
+ if (stdalgo::string::equalsci(restrictbannedusers, "no"))
+ RestrictBannedUsers = ServerConfig::BUT_NORMAL;
+ else if (stdalgo::string::equalsci(restrictbannedusers, "silent"))
+ RestrictBannedUsers = ServerConfig::BUT_RESTRICT_SILENT;
+ else if (stdalgo::string::equalsci(restrictbannedusers, "yes"))
+ RestrictBannedUsers = ServerConfig::BUT_RESTRICT_NOTIFY;
+ else
+ throw CoreException(restrictbannedusers + " is an invalid <options:restrictbannedusers> value, at " + options->getTagLocation());
+
DisabledUModes.reset();
std::string modes = ConfValue("disabled")->getString("usermodes");
for (std::string::const_iterator p = modes.begin(); p != modes.end(); ++p)