mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add comments for server IP parsing
Dot is used for determining of the given IP is a server alias or a direct ip address or domain name. See #83
This commit is contained in:
parent
f076e1f512
commit
f5a67090c2
1 changed files with 2 additions and 0 deletions
|
|
@ -468,12 +468,14 @@ namespace MinecraftClient
|
||||||
|
|
||||||
if (host == "localhost" || host.Contains('.'))
|
if (host == "localhost" || host.Contains('.'))
|
||||||
{
|
{
|
||||||
|
//Server IP (IP or domain names contains at least a dot)
|
||||||
ServerIP = host;
|
ServerIP = host;
|
||||||
ServerPort = port;
|
ServerPort = port;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (Servers.ContainsKey(server))
|
else if (Servers.ContainsKey(server))
|
||||||
{
|
{
|
||||||
|
//Server Alias (if no dot then treat the server as an alias)
|
||||||
ServerIP = Servers[server].Key;
|
ServerIP = Servers[server].Key;
|
||||||
ServerPort = Servers[server].Value;
|
ServerPort = Servers[server].Value;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue