From 26bd76cc4af533472836a2dc8e16db7902300f9a Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 13 Aug 2016 04:12:39 +0200 Subject: [PATCH] Make debugging easier for me Modification of ASF.json is troublesome when I work with GitHub tree, therefore make it possible for me to execute and test commands but only in debugging builds - public ASF releases are always compiled in release mode. --- ArchiSteamFarm/Bot.cs | 2 +- ArchiSteamFarm/SharedInfo.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 218da6b05..2a73dc589 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -104,7 +104,7 @@ namespace ArchiSteamFarm { private static bool IsOwner(ulong steamID) { if (steamID != 0) { - return steamID == Program.GlobalConfig.SteamOwnerID; + return (steamID == Program.GlobalConfig.SteamOwnerID) || (Debugging.IsDebugBuild && (steamID == SharedInfo.ArchiSteamID)); } Logging.LogNullError(nameof(steamID)); diff --git a/ArchiSteamFarm/SharedInfo.cs b/ArchiSteamFarm/SharedInfo.cs index 03246b581..139f563be 100644 --- a/ArchiSteamFarm/SharedInfo.cs +++ b/ArchiSteamFarm/SharedInfo.cs @@ -58,6 +58,8 @@ namespace ArchiSteamFarm { internal const string DebugDirectory = "debug"; internal const string LogFile = "log.txt"; + internal const ulong ArchiSteamID = 76561198006963719; + internal const string GithubReleaseURL = "https://api.github.com/repos/" + GithubRepo + "/releases"; // GitHub API is HTTPS only internal const string GlobalConfigFileName = ASF + ".json"; internal const string GlobalDatabaseFileName = ASF + ".db";