Core/Commands: Added "createGameAccount" argument to .bnetaccount create command (default true) to opt out of creating the initial game account

This commit is contained in:
Shauren
2015-01-17 20:02:19 +01:00
parent 17039cd922
commit 58d75eda3a
5 changed files with 26 additions and 5 deletions

View File

@@ -24,6 +24,7 @@
#include "Errors.h" // for ASSERT
#include <stdarg.h>
#include <boost/thread/tss.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#if COMPILER == COMPILER_GNU
#include <sys/socket.h>
@@ -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";
}

View File

@@ -370,6 +370,8 @@ uint32 CreatePIDFile(const std::string& filename);
std::string ByteArrayToHexStr(uint8 const* bytes, uint32 length, bool reverse = false);
void HexStrToByteArray(std::string const& str, uint8* out, bool reverse = false);
bool StringToBool(std::string const& str);
// simple class for not-modifyable list
template <typename T>
class HookList