Added DNS resolution for hostnames (no-ip and the like).
This commit is contained in:
parent
7608476005
commit
b32e11a49f
1 changed files with 4 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
|
|
@ -498,7 +499,9 @@ namespace TShockAPI
|
|||
}
|
||||
if (args[0].Equals(ip))
|
||||
{
|
||||
return GetGroup(args[1]);
|
||||
IPHostEntry host = Dns.GetHostEntry(args[1]);
|
||||
IPAddress[] ipaddr = host.AddressList;
|
||||
return GetGroup(ipaddr.GetValue(0).ToString());
|
||||
}
|
||||
}
|
||||
sr.Close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue