mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Revert "Add an IP lookup to the WebSocketBot"
This reverts commit 0a149647b6.
This commit is contained in:
parent
0a149647b6
commit
fd1009b43f
1 changed files with 2 additions and 11 deletions
|
|
@ -291,17 +291,7 @@ public class WebSocketBot : ChatBot
|
||||||
|
|
||||||
public WebSocketBot()
|
public WebSocketBot()
|
||||||
{
|
{
|
||||||
// Lookup the given address
|
var match = Regex.Match(Config.Ip!, @"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}");
|
||||||
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}");
|
|
||||||
|
|
||||||
if (!match.Success)
|
if (!match.Success)
|
||||||
{
|
{
|
||||||
|
|
@ -315,6 +305,7 @@ public class WebSocketBot : ChatBot
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ip = Config.Ip;
|
||||||
_port = Config.Port;
|
_port = Config.Port;
|
||||||
_password = Config.Password;
|
_password = Config.Password;
|
||||||
_authenticatedSessions = new();
|
_authenticatedSessions = new();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue