Merge pull request #566 from majestrate/on-off-patch

add on/off values
This commit is contained in:
Jeff 2019-04-28 07:49:59 -04:00 committed by GitHub
commit 81bf00f9bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ namespace llarp
std::string value = str;
std::transform(value.begin(), value.end(), value.begin(),
[](char ch) -> char { return std::tolower(ch); });
return value == "no" || value == "false" || value == "0";
return value == "no" || value == "false" || value == "0" || value == "off";
}
bool
@ -21,7 +21,7 @@ namespace llarp
std::string value = str;
std::transform(value.begin(), value.end(), value.begin(),
[](char ch) -> char { return std::tolower(ch); });
return value == "yes" || value == "true" || value == "1";
return value == "yes" || value == "true" || value == "1" || value == "on";
}
bool