Aurora.Addon.HyperGrid.HypergridHandlers.GetRegion C# (CSharp) Method

GetRegion() public method

public GetRegion ( Nwc.XmlRpc.XmlRpcRequest request, IPEndPoint remoteClient ) : Nwc.XmlRpc.XmlRpcResponse
request Nwc.XmlRpc.XmlRpcRequest
remoteClient System.Net.IPEndPoint
return Nwc.XmlRpc.XmlRpcResponse
        public XmlRpcResponse GetRegion(XmlRpcRequest request, IPEndPoint remoteClient)
        {
            Hashtable requestData = (Hashtable)request.Params[0];
            //string host = (string)requestData["host"];
            //string portstr = (string)requestData["port"];
            string regionID_str = (string)requestData["region_uuid"];
            UUID regionID = UUID.Zero;
            UUID.TryParse (regionID_str, out regionID);

            GridRegion regInfo = m_GatekeeperService.GetHyperlinkRegion (regionID);

            Hashtable hash = new Hashtable ();
            if (regInfo == null)
                hash["result"] = "false";
            else
            {
                hash["result"] = "true";
                hash["uuid"] = regInfo.RegionID.ToString ();
                hash["x"] = regInfo.RegionLocX.ToString ();
                hash["y"] = regInfo.RegionLocY.ToString ();
                hash["region_name"] = regInfo.RegionName;
                hash["hostname"] = regInfo.ExternalHostName;
                hash["http_port"] = regInfo.HttpPort.ToString ();
                hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString ();
            }
            XmlRpcResponse response = new XmlRpcResponse ();
            response.Value = hash;
            return response;
        }