From 50a62145ad554277281a3166de0a29353adb07c4 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 Aug 2008 12:58:54 +0000 Subject: * Initial inspection of UserLoginService.cs, cleaned up source code slightly to make it easier to work with. --- OpenSim/Framework/Util.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Framework/Util.cs') diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 2a21221..09bf029 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -362,6 +362,16 @@ namespace OpenSim.Framework } /// + /// Converts a URL to a IPAddress + /// + /// URL Standard Format + /// A resolved IP Address + public static IPAddress GetHostFromURL(string url) + { + return GetHostFromDNS(url.Split(new char[] {'/', ':'})[3]); + } + + /// /// Returns a IP address from a specified DNS, favouring IPv4 addresses. /// /// DNS Hostname -- cgit v1.1