summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/configparser.cpp9
-rw-r--r--src/users.cpp4
2 files changed, 12 insertions, 1 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 558c49117..4a0c9b58d 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -429,7 +429,14 @@ bool ConfigTag::getBool(const std::string &key, bool def)
if(!readString(key, result))
return def;
- return (result == "yes" || result == "true" || result == "1" || result == "on");
+ if (result == "yes" || result == "true" || result == "1" || result == "on")
+ return true;
+ if (result == "no" || result == "false" || result == "0" || result == "off")
+ return false;
+
+ ServerInstance->Logs->Log("CONFIG",DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() +
+ " is not valid, ignoring");
+ return def;
}
std::string ConfigTag::getTagLocation()
diff --git a/src/users.cpp b/src/users.cpp
index c01b5d1b2..62bf0f543 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1646,6 +1646,10 @@ void LocalUser::SetClass(const std::string &explicit_name)
continue;
}
+ bool regdone = (registered != REG_NONE);
+ if (c->config->getBool("registered", regdone) != regdone)
+ continue;
+
/* we stop at the first class that meets ALL critera. */
found = c;
break;