From 79a8be22c5e97c4cab3d332c0ab30bcc3a853822 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 5 Dec 2017 15:11:28 +0100 Subject: [PATCH] cli: Parse on/off as boolean --- cli/helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/helper.cpp b/cli/helper.cpp index 6fa7b30..4855b39 100644 --- a/cli/helper.cpp +++ b/cli/helper.cpp @@ -679,9 +679,9 @@ string tagName(const Tag *tag) bool stringToBool(const string &str) { - if(str == "yes" || str == "true" || str == "1") { + if(str == "yes" || str == "true" || str == "on" || str == "1") { return true; - } else if(str == "no" || str == "false" || str == "0") { + } else if(str == "no" || str == "false" || str == "off" || str == "0") { return false; } throw ConversionException(argsToString('\"', str, "\" is not yes or no"));