diff --git a/MinecraftClient/ChatBots/WebSocketBot.cs b/MinecraftClient/ChatBots/WebSocketBot.cs index 8320e5b4..6ba4395e 100644 --- a/MinecraftClient/ChatBots/WebSocketBot.cs +++ b/MinecraftClient/ChatBots/WebSocketBot.cs @@ -291,17 +291,7 @@ public class WebSocketBot : ChatBot public WebSocketBot() { - // Lookup the given address - try - { - _ip = Dns.GetHostAddresses(Config.Ip!).First().ToString(); - } - catch (Exception e) - { - // Set Ip to a non-acceptable value to fail the Ip check - _ip = "not found"; - } - var match = Regex.Match(_ip, @"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"); + var match = Regex.Match(Config.Ip!, @"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}"); if (!match.Success) { @@ -315,6 +305,7 @@ public class WebSocketBot : ChatBot return; } + _ip = Config.Ip; _port = Config.Port; _password = Config.Password; _authenticatedSessions = new();