aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
authorMW2007-06-08 16:16:32 +0000
committerMW2007-06-08 16:16:32 +0000
commit6acfd0ddea3857a10f74095fb7ac73f5c52f1a58 (patch)
tree485f3543f93dc0e717170f831eace98e3cdfb3ce /OpenSim/OpenSim.RegionServer
parentAdded prebuild.exe and fixed a couple of namespace problems in AvatarAnimatio... (diff)
downloadopensim-SC_OLD-6acfd0ddea3857a10f74095fb7ac73f5c52f1a58.zip
opensim-SC_OLD-6acfd0ddea3857a10f74095fb7ac73f5c52f1a58.tar.gz
opensim-SC_OLD-6acfd0ddea3857a10f74095fb7ac73f5c52f1a58.tar.bz2
opensim-SC_OLD-6acfd0ddea3857a10f74095fb7ac73f5c52f1a58.tar.xz
prebuild.xml should be fixed/updated.
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj12
-rw-r--r--OpenSim/OpenSim.RegionServer/RegionInfo.cs147
2 files changed, 9 insertions, 150 deletions
diff --git a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
index 2c61026..b7cea3a 100644
--- a/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
+++ b/OpenSim/OpenSim.RegionServer/OpenSim.RegionServer.csproj
@@ -69,7 +69,6 @@
69 <HintPath>System.dll</HintPath> 69 <HintPath>System.dll</HintPath>
70 <Private>False</Private> 70 <Private>False</Private>
71 </Reference> 71 </Reference>
72 <Reference Include="System.Data" />
73 <Reference Include="System.Xml"> 72 <Reference Include="System.Xml">
74 <HintPath>System.Xml.dll</HintPath> 73 <HintPath>System.Xml.dll</HintPath>
75 <Private>False</Private> 74 <Private>False</Private>
@@ -162,7 +161,12 @@
162 <Compile Include="CommsManager.cs"> 161 <Compile Include="CommsManager.cs">
163 <SubType>Code</SubType> 162 <SubType>Code</SubType>
164 </Compile> 163 </Compile>
165 <Compile Include="OpenSimNetworkHandler.cs" /> 164 <Compile Include="NetworkServersInfo.cs">
165 <SubType>Code</SubType>
166 </Compile>
167 <Compile Include="OpenSimNetworkHandler.cs">
168 <SubType>Code</SubType>
169 </Compile>
166 <Compile Include="PacketServer.cs"> 170 <Compile Include="PacketServer.cs">
167 <SubType>Code</SubType> 171 <SubType>Code</SubType>
168 </Compile> 172 </Compile>
@@ -172,7 +176,9 @@
172 <Compile Include="UDPServer.cs"> 176 <Compile Include="UDPServer.cs">
173 <SubType>Code</SubType> 177 <SubType>Code</SubType>
174 </Compile> 178 </Compile>
175 <Compile Include="UserConfigUtility.cs" /> 179 <Compile Include="UserConfigUtility.cs">
180 <SubType>Code</SubType>
181 </Compile>
176 <Compile Include="VersionInfo.cs"> 182 <Compile Include="VersionInfo.cs">
177 <SubType>Code</SubType> 183 <SubType>Code</SubType>
178 </Compile> 184 </Compile>
diff --git a/OpenSim/OpenSim.RegionServer/RegionInfo.cs b/OpenSim/OpenSim.RegionServer/RegionInfo.cs
deleted file mode 100644
index d148d0f..0000000
--- a/OpenSim/OpenSim.RegionServer/RegionInfo.cs
+++ /dev/null
@@ -1,147 +0,0 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Net;
5using System.Web;
6using System.IO;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Utilities;
9using libsecondlife;
10using OpenSim.Framework.Types;
11
12namespace OpenSim
13{
14 public class RegionInfo : RegionInfoBase
15 {
16
17 private bool isSandbox;
18
19 public string DataStore;
20
21 public RegionInfo()
22 {
23
24 }
25
26 public void InitConfig(bool sandboxMode, IGenericConfig configData)
27 {
28 this.isSandbox = sandboxMode;
29 try
30 {
31 // Sim UUID
32 string attri = "";
33 attri = configData.GetAttribute("SimUUID");
34 if (attri == "")
35 {
36 this.SimUUID = LLUUID.Random();
37 configData.SetAttribute("SimUUID", this.SimUUID.ToString());
38 }
39 else
40 {
41 this.SimUUID = new LLUUID(attri);
42 }
43
44 // Sim name
45 attri = "";
46 attri = configData.GetAttribute("SimName");
47 if (attri == "")
48 {
49 this.RegionName = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Name", "OpenSim test");
50 configData.SetAttribute("SimName", this.RegionName);
51 }
52 else
53 {
54 this.RegionName = attri;
55 }
56 // Sim/Grid location X
57 attri = "";
58 attri = configData.GetAttribute("SimLocationX");
59 if (attri == "")
60 {
61 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location X", "997");
62 configData.SetAttribute("SimLocationX", location);
63 this.RegionLocX = (uint)Convert.ToUInt32(location);
64 }
65 else
66 {
67 this.RegionLocX = (uint)Convert.ToUInt32(attri);
68 }
69 // Sim/Grid location Y
70 attri = "";
71 attri = configData.GetAttribute("SimLocationY");
72 if (attri == "")
73 {
74 string location = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid Location Y", "996");
75 configData.SetAttribute("SimLocationY", location);
76 this.RegionLocY = (uint)Convert.ToUInt32(location);
77 }
78 else
79 {
80 this.RegionLocY = (uint)Convert.ToUInt32(attri);
81 }
82
83 // Local storage datastore
84 attri = "";
85 attri = configData.GetAttribute("Datastore");
86 if (attri == "")
87 {
88 string datastore = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Filename for local storage", "localworld.yap");
89 configData.SetAttribute("Datastore", datastore);
90 this.DataStore = datastore;
91 }
92 else
93 {
94 this.DataStore = attri;
95 }
96
97 //Sim Listen Port
98 attri = "";
99 attri = configData.GetAttribute("SimListenPort");
100 if (attri == "")
101 {
102 string port = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("UDP port for client connections", "9000");
103 configData.SetAttribute("SimListenPort", port);
104 this.IPListenPort = Convert.ToInt32(port);
105 }
106 else
107 {
108 this.IPListenPort = Convert.ToInt32(attri);
109 }
110 //Sim Listen Address
111 attri = "";
112 attri = configData.GetAttribute("SimListenAddress");
113 if (attri == "")
114 {
115 this.IPListenAddr = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("IP Address to listen on for client connections", "127.0.0.1");
116 configData.SetAttribute("SimListenAddress", this.IPListenAddr);
117 }
118 else
119 {
120 this.IPListenAddr = attri;
121 }
122
123
124 this.RegionHandle = Util.UIntsToLong((RegionLocX * 256), (RegionLocY * 256));
125
126 configData.Commit();
127 }
128 catch (Exception e)
129 {
130 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,"Config.cs:InitConfig() - Exception occured");
131 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM,e.ToString());
132 }
133
134 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Sim settings loaded:");
135 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "UUID: " + this.SimUUID.ToStringHyphenated());
136 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Name: " + this.RegionName);
137 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Location: [" + this.RegionLocX.ToString() + "," + this.RegionLocY + "]");
138 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Region Handle: " + this.RegionHandle.ToString());
139 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Listening on IP: " + this.IPListenAddr + ":" + this.IPListenPort);
140 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Sandbox Mode? " + isSandbox.ToString());
141 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset URL: " + this.AssetURL);
142 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Asset key: " + this.AssetSendKey);
143 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid URL: " + this.GridURL);
144 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Grid key: " + this.GridSendKey);
145 }
146 }
147}