From 58d75eda3a0fea8f64d434adb7707b2dfd953089 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 17 Jan 2015 20:02:19 +0100 Subject: Core/Commands: Added "createGameAccount" argument to .bnetaccount create command (default true) to opt out of creating the initial game account --- src/server/shared/Utilities/Util.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/server/shared/Utilities/Util.cpp') diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp index ff54237d10a..9a3d612a54b 100644 --- a/src/server/shared/Utilities/Util.cpp +++ b/src/server/shared/Utilities/Util.cpp @@ -24,6 +24,7 @@ #include "Errors.h" // for ASSERT #include #include +#include #if COMPILER == COMPILER_GNU #include @@ -605,3 +606,9 @@ void HexStrToByteArray(std::string const& str, uint8* out, bool reverse /*= fals out[j++] = strtoul(buffer, NULL, 16); } } + +bool StringToBool(std::string const& str) +{ + std::string lowerStr = boost::algorithm::to_lower_copy(str); + return lowerStr == "1" || lowerStr == "true" || lowerStr == "yes"; +} -- cgit v1.2.3