diff --git a/cpp/utils.cc b/cpp/utils.cc index 5c2533b..88562b0 100644 --- a/cpp/utils.cc +++ b/cpp/utils.cc @@ -191,4 +191,10 @@ namespace f8 std::string gameid = strings[1]; return a8::XValue(channelid); } + + bool IsOnlineEnv() + { + return !getenv("SERVER_ENV"); + } + } diff --git a/cpp/utils.h b/cpp/utils.h index c07dc7a..aca7d55 100644 --- a/cpp/utils.h +++ b/cpp/utils.h @@ -87,4 +87,6 @@ namespace f8 bool IsValidSessionId(const std::string& accountid, const std::string& sessionid); int ExtractGameIdFromAccountId(const std::string& accountid); int ExtractChannelIdFromAccountId(const std::string& accountid); + + bool IsOnlineEnv(); }