aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
diff options
context:
space:
mode:
authorDr Scofield2008-05-19 11:52:51 +0000
committerDr Scofield2008-05-19 11:52:51 +0000
commit4e93228e25a941dde4b01c4ec934cd1907096a6f (patch)
tree8c7a7d1f36bbc55c834bc52b5fe1d0582f648c87 /OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
parentadding OSHttpRequest and OSHttpResponse which wrap HttpListenerRequest and Ht... (diff)
downloadopensim-SC_OLD-4e93228e25a941dde4b01c4ec934cd1907096a6f.zip
opensim-SC_OLD-4e93228e25a941dde4b01c4ec934cd1907096a6f.tar.gz
opensim-SC_OLD-4e93228e25a941dde4b01c4ec934cd1907096a6f.tar.bz2
opensim-SC_OLD-4e93228e25a941dde4b01c4ec934cd1907096a6f.tar.xz
fixing exception when RestPlugin not configured. refactors RestRegionPlugin, adds error checking.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs34
1 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
index 5102e3f..c86c67f 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/RegionDetails.cs
@@ -23,7 +23,7 @@
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28 28
29using libsecondlife; 29using libsecondlife;
@@ -65,8 +65,38 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
65 region_external_hostname = regInfo.ExternalHostName; 65 region_external_hostname = regInfo.ExternalHostName;
66 66
67 if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName)) 67 if (!String.IsNullOrEmpty(regInfo.MasterAvatarFirstName))
68 region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName, 68 region_owner = String.Format("{0} {1}", regInfo.MasterAvatarFirstName,
69 regInfo.MasterAvatarLastName); 69 regInfo.MasterAvatarLastName);
70 } 70 }
71
72 public string this[string idx]
73 {
74 get
75 {
76 switch(idx.ToLower())
77 {
78 case "name":
79 return region_name;
80 case "id":
81 return region_id;
82 case "location":
83 return String.Format("<x>{0}</x><y>{1}</y>", region_x, region_y);
84 case "owner":
85 return region_owner;
86 case "owner_id":
87 return region_owner_id;
88 case "http_port":
89 return region_http_port.ToString();
90 case "server_uri":
91 return region_server_uri;
92 case "external_hostname":
93 case "hostname":
94 return region_external_hostname;
95
96 default:
97 return null;
98 }
99 }
100 }
71 } 101 }
72} \ No newline at end of file 102} \ No newline at end of file