diff options
author | lbsa71 | 2007-07-02 06:55:36 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-02 06:55:36 +0000 |
commit | d78f6505e351c3975a40e68ecd7b34760eec658d (patch) | |
tree | 8f6d95c7ef09b14c2566e8d95db71661e24274b8 | |
parent | Just committing this because I want my commit to be on the front page of www.... (diff) | |
download | opensim-SC_OLD-d78f6505e351c3975a40e68ecd7b34760eec658d.zip opensim-SC_OLD-d78f6505e351c3975a40e68ecd7b34760eec658d.tar.gz opensim-SC_OLD-d78f6505e351c3975a40e68ecd7b34760eec658d.tar.bz2 opensim-SC_OLD-d78f6505e351c3975a40e68ecd7b34760eec658d.tar.xz |
* worked some more on the RegionInfo attr fuggliness
-rw-r--r-- | OpenSim/Framework/General/Types/RegionInfo.cs | 76 |
1 files changed, 15 insertions, 61 deletions
diff --git a/OpenSim/Framework/General/Types/RegionInfo.cs b/OpenSim/Framework/General/Types/RegionInfo.cs index 9cef2ba..69a941e 100644 --- a/OpenSim/Framework/General/Types/RegionInfo.cs +++ b/OpenSim/Framework/General/Types/RegionInfo.cs | |||
@@ -108,45 +108,6 @@ namespace OpenSim.Framework.Types | |||
108 | public string MasterAvatarLastName = ""; | 108 | public string MasterAvatarLastName = ""; |
109 | public string MasterAvatarSandboxPassword = ""; | 109 | public string MasterAvatarSandboxPassword = ""; |
110 | 110 | ||
111 | //private int? m_commsIPListenPort; | ||
112 | |||
113 | ///// <summary> | ||
114 | ///// Port used for listening (TCP and UDP) | ||
115 | ///// </summary> | ||
116 | ///// <remarks>Seperate TCP and UDP</remarks> | ||
117 | //public int CommsIPListenPort | ||
118 | //{ | ||
119 | // get | ||
120 | // { | ||
121 | // return m_commsIPListenPort.Value; | ||
122 | // } | ||
123 | //} | ||
124 | |||
125 | //private string m_commsIPListenAddr; | ||
126 | ///// <summary> | ||
127 | ///// Address used for internal listening (default: 0.0.0.0?) | ||
128 | ///// </summary> | ||
129 | //public string CommsIPListenAddr | ||
130 | //{ | ||
131 | // get | ||
132 | // { | ||
133 | // return m_commsIPListenAddr; | ||
134 | // } | ||
135 | //} | ||
136 | |||
137 | //private string m_commsExternalAddress; | ||
138 | ///// <summary> | ||
139 | ///// Address used for external addressing (DNS or IP) | ||
140 | ///// </summary> | ||
141 | //public string CommsExternalAddress | ||
142 | //{ | ||
143 | // get | ||
144 | // { | ||
145 | // return m_commsExternalAddress; | ||
146 | // } | ||
147 | //} | ||
148 | |||
149 | |||
150 | public EstateSettings estateSettings; | 111 | public EstateSettings estateSettings; |
151 | 112 | ||
152 | public RegionInfo() | 113 | public RegionInfo() |
@@ -160,10 +121,6 @@ namespace OpenSim.Framework.Types | |||
160 | m_regionLocX = regionLocX; | 121 | m_regionLocX = regionLocX; |
161 | m_regionLocY = regionLocY; | 122 | m_regionLocY = regionLocY; |
162 | 123 | ||
163 | //m_commsIPListenAddr = simIp; | ||
164 | //m_commsIPListenPort = simPort; | ||
165 | //m_commsExternalAddress = simUri; | ||
166 | |||
167 | m_internalEndPoint = internalEndPoint; | 124 | m_internalEndPoint = internalEndPoint; |
168 | m_externalHostName = externalUri; | 125 | m_externalHostName = externalUri; |
169 | } | 126 | } |
@@ -173,32 +130,24 @@ namespace OpenSim.Framework.Types | |||
173 | this.isSandbox = sandboxMode; | 130 | this.isSandbox = sandboxMode; |
174 | try | 131 | try |
175 | { | 132 | { |
176 | // Sim UUID | ||
177 | string attri = ""; | 133 | string attri = ""; |
178 | attri = configData.GetAttribute("SimUUID"); | 134 | |
179 | if (attri == "") | 135 | // Sim UUID |
136 | string simId = configData.GetAttribute("SimUUID"); | ||
137 | if (String.IsNullOrEmpty( simId )) | ||
180 | { | 138 | { |
181 | this.SimUUID = LLUUID.Random(); | 139 | this.SimUUID = LLUUID.Random(); |
182 | configData.SetAttribute("SimUUID", this.SimUUID.ToString()); | ||
183 | } | 140 | } |
184 | else | 141 | else |
185 | { | 142 | { |
186 | this.SimUUID = new LLUUID(attri); | 143 | this.SimUUID = new LLUUID(simId); |
187 | } | 144 | } |
145 | configData.SetAttribute("SimUUID", this.SimUUID.ToString()); | ||
188 | 146 | ||
189 | // Sim name | 147 | this.RegionName = GetString(configData, "SimName", "OpenSim test", "Region Name"); |
190 | attri = ""; | 148 | |
191 | attri = configData.GetAttribute("SimName"); | 149 | //m_regionLocX = (uint) GetInt(configData, "SimLocationX", 1000, "Grid Location X"); |
192 | if (attri == "") | 150 | |
193 | { | ||
194 | this.RegionName = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Name", "OpenSim test"); | ||
195 | configData.SetAttribute("SimName", this.RegionName); | ||
196 | } | ||
197 | else | ||
198 | { | ||
199 | this.RegionName = attri; | ||
200 | } | ||
201 | // Sim/Grid location X | ||
202 | attri = ""; | 151 | attri = ""; |
203 | attri = configData.GetAttribute("SimLocationX"); | 152 | attri = configData.GetAttribute("SimLocationX"); |
204 | if (attri == "") | 153 | if (attri == "") |
@@ -312,6 +261,11 @@ namespace OpenSim.Framework.Types | |||
312 | 261 | ||
313 | } | 262 | } |
314 | 263 | ||
264 | private uint GetInt(IGenericConfig configData, string p, int p_3, string p_4) | ||
265 | { | ||
266 | throw new Exception("The method or operation is not implemented."); | ||
267 | } | ||
268 | |||
315 | private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) | 269 | private string GetString(IGenericConfig configData, string attrName, string defaultvalue, string prompt) |
316 | { | 270 | { |
317 | string s = configData.GetAttribute(attrName); | 271 | string s = configData.GetAttribute(attrName); |