public OSDMap GetUrlsForUser(GridRegion region, UUID userID) { if ((((RegionFlags)region.Flags) & RegionFlags.Foreign) != RegionFlags.Foreign) { MainConsole.Instance.Debug("[IWC]: Not a foreign region"); return(null); } string host = userID.ToString(); IGridRegistrationService module = Registry.RequestModuleInterface <IGridRegistrationService>(); if (module != null) { module.RemoveUrlsForClient(host); module.RemoveUrlsForClient(host + "|" + region.RegionHandle); IsGettingUrlsForIWCConnection = true; OSDMap map = module.GetUrlForRegisteringClient(host + "|" + region.RegionHandle); IsGettingUrlsForIWCConnection = false; string url = region.GenericMap["URL"]; if (url == "") { MainConsole.Instance.Warn("[IWC]: Foreign region with no URL"); return(null); //What the hell? Its a foreign region, it better have a URL! } //Remove the /Grid.... stuff url = url.Remove(url.Length - 5 - 36); OutgoingPublicComms.InformOfURLs(url + "/iwcconnection", map, userID, region.RegionHandle); return(map); } return(null); }