From 7dc18695d49b6b84bc0f08f328eead85184b85bd Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 4 Sep 2016 22:19:47 +0200 Subject: [PATCH] --- src/Components/Modules/Auth.cpp | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/Components/Modules/Auth.cpp b/src/Components/Modules/Auth.cpp index cebec5ec..ed33eff8 100644 --- a/src/Components/Modules/Auth.cpp +++ b/src/Components/Modules/Auth.cpp @@ -391,23 +391,26 @@ namespace Components Logger::Print("Your guid: %llX\n", Steam::SteamUser()->GetSteamID().Bits); }); - Command::Add("securityLevel", [] (Command::Params params) + if (!Dedicated::IsEnabled() && !ZoneBuilder::IsEnabled()) { - if (params.Length() < 2) + Command::Add("securityLevel", [] (Command::Params params) { - uint32_t level = Auth::GetZeroBits(Auth::GuidToken, Auth::GuidKey.GetPublicKey()); - Logger::Print("Your current security level is %d\n", level); - Logger::Print("Your security token is: %s\n", Utils::String::DumpHex(Auth::GuidToken.ToString(), "").data()); - Logger::Print("Your computation token is: %s\n", Utils::String::DumpHex(Auth::ComputeToken.ToString(), "").data()); + if (params.Length() < 2) + { + uint32_t level = Auth::GetZeroBits(Auth::GuidToken, Auth::GuidKey.GetPublicKey()); + Logger::Print("Your current security level is %d\n", level); + Logger::Print("Your security token is: %s\n", Utils::String::DumpHex(Auth::GuidToken.ToString(), "").data()); + Logger::Print("Your computation token is: %s\n", Utils::String::DumpHex(Auth::ComputeToken.ToString(), "").data()); - Toast::Show("cardicon_locked", "^5Security Level", fmt::sprintf("Your security level is %d", level), 3000); - } - else - { - uint32_t level = static_cast(atoi(params[1])); - Auth::IncreaseSecurityLevel(level); - } - }); + Toast::Show("cardicon_locked", "^5Security Level", fmt::sprintf("Your security level is %d", level), 3000); + } + else + { + uint32_t level = static_cast(atoi(params[1])); + Auth::IncreaseSecurityLevel(level); + } + }); + } UIScript::Add("security_increase_cancel", [] () {