diff --git a/MCGalaxy/Bots/Instructions/HunterInstructions.cs b/MCGalaxy/Bots/Instructions/HunterInstructions.cs index 868daf0ab..0b2a7b1b7 100644 --- a/MCGalaxy/Bots/Instructions/HunterInstructions.cs +++ b/MCGalaxy/Bots/Instructions/HunterInstructions.cs @@ -133,7 +133,7 @@ public sealed class StareInstruction : BotInstruction { public StareInstruction() { Name = "stare"; } public override bool Execute(PlayerBot bot, InstructionData data) { - int search = 20000; + int search = 1000; if (data.Metadata != null) search = (ushort)data.Metadata; Player closest = HuntInstruction.ClosestPlayer(bot, search); @@ -170,7 +170,7 @@ public sealed class StareInstruction : BotInstruction { static string[] help = new string[] { "&T/BotAI add [name] stare ", "&HCauses the bot to stare at the closest player in the search radius.", - "&H defaults to 20000 blocks.", + "&H defaults to 1000 blocks.", }; } } diff --git a/MCGalaxy/Network/Heartbeat/Heartbeat.cs b/MCGalaxy/Network/Heartbeat/Heartbeat.cs index dc0e18c23..25159c730 100644 --- a/MCGalaxy/Network/Heartbeat/Heartbeat.cs +++ b/MCGalaxy/Network/Heartbeat/Heartbeat.cs @@ -115,7 +115,7 @@ public abstract class Heartbeat static string lastUrls; - public static void ReloadDefault() { + internal static void ReloadDefault() { string urls = Server.Config.HeartbeatURL; // don't reload heartbeats unless absolutely have to if (urls == lastUrls) return; diff --git a/MCGalaxy/Server/Authentication/AuthService.cs b/MCGalaxy/Server/Authentication/AuthService.cs index a3860bf93..3fcaa8161 100644 --- a/MCGalaxy/Server/Authentication/AuthService.cs +++ b/MCGalaxy/Server/Authentication/AuthService.cs @@ -66,25 +66,15 @@ public static AuthService GetOrCreate(string url, bool canSave = true) } - static string lastUrls; - /// Reloads list of authentication services from server config - public static void UpdateList() { - string urls = Server.Config.HeartbeatURL; - LoadServices(); - - if (urls == lastUrls) return; - lastUrls = urls; - - // only update services with defaults when absolutely have to - foreach (string url in urls.SplitComma()) - { - GetOrCreate(url); - } - } - - static void LoadServices() { + /// Updates list of authentication services from authservices.properties + internal static void UpdateList() { AuthService cur = null; PropertiesFile.Read(Paths.AuthServicesFile, ref cur, ParseProperty, '=', true); + + // NOTE: Heartbeat.ReloadDefault will call GetOrCreate for all of the + // URLs specified in the HeartbeatURL server configuration property + // Therefore it is unnecessary to create default AuthServices here + // (e.g. for when authservices.properties is empty or is missing a URL) } static void ParseProperty(string key, string value, ref AuthService cur) {