aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/Linden/LLProxyLoginModule.cs
diff options
context:
space:
mode:
authorMelanie2010-01-10 03:03:18 +0000
committerMelanie2010-01-10 03:03:18 +0000
commit81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba (patch)
treef8f820a1f62add2d945d768e1f306592027b2d0f /OpenSim/Client/Linden/LLProxyLoginModule.cs
parentFixes prim to prim collision. (diff)
downloadopensim-SC_OLD-81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba.zip
opensim-SC_OLD-81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba.tar.gz
opensim-SC_OLD-81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba.tar.bz2
opensim-SC_OLD-81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba.tar.xz
Remove "login disable", "login enable" and "login status" commands.
Diffstat (limited to 'OpenSim/Client/Linden/LLProxyLoginModule.cs')
-rw-r--r--OpenSim/Client/Linden/LLProxyLoginModule.cs103
1 files changed, 37 insertions, 66 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs
index 9075f15..14ce682 100644
--- a/OpenSim/Client/Linden/LLProxyLoginModule.cs
+++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs
@@ -60,21 +60,6 @@ namespace OpenSim.Client.Linden
60 m_port = port; 60 m_port = port;
61 } 61 }
62 62
63 protected bool RegionLoginsEnabled
64 {
65 get
66 {
67 if (m_firstScene != null)
68 {
69 return m_firstScene.SceneGridService.RegionLoginsEnabled;
70 }
71 else
72 {
73 return false;
74 }
75 }
76 }
77
78 protected List<Scene> m_scenes = new List<Scene>(); 63 protected List<Scene> m_scenes = new List<Scene>();
79 protected Scene m_firstScene; 64 protected Scene m_firstScene;
80 65
@@ -239,67 +224,53 @@ namespace OpenSim.Client.Linden
239 agentData.child = false; 224 agentData.child = false;
240 } 225 }
241 226
242 if (!RegionLoginsEnabled) 227 bool success = false;
243 { 228 string denyMess = "";
244 m_log.InfoFormat(
245 "[CLIENT]: Denying access for user {0} {1} because region login is currently disabled",
246 agentData.firstname, agentData.lastname);
247 229
248 Hashtable respdata = new Hashtable(); 230 Scene scene;
249 respdata["success"] = "FALSE"; 231 if (TryGetRegion(regionHandle, out scene))
250 respdata["reason"] = "region login currently disabled";
251 resp.Value = respdata;
252 }
253 else
254 { 232 {
255 bool success = false; 233 if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID))
256 string denyMess = ""; 234 {
257 235 denyMess = "User is banned from this region";
258 Scene scene; 236 m_log.InfoFormat(
259 if (TryGetRegion(regionHandle, out scene)) 237 "[CLIENT]: Denying access for user {0} {1} because user is banned",
238 agentData.firstname, agentData.lastname);
239 }
240 else
260 { 241 {
261 if (scene.RegionInfo.EstateSettings.IsBanned(agentData.AgentID)) 242 string reason;
243 if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason))
262 { 244 {
263 denyMess = "User is banned from this region"; 245 success = true;
264 m_log.InfoFormat(
265 "[CLIENT]: Denying access for user {0} {1} because user is banned",
266 agentData.firstname, agentData.lastname);
267 } 246 }
268 else 247 else
269 { 248 {
270 string reason; 249 denyMess = String.Format("Login refused by region: {0}", reason);
271 if (scene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) 250 m_log.InfoFormat(
272 { 251 "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region",
273 success = true; 252 agentData.firstname, agentData.lastname);
274 }
275 else
276 {
277 denyMess = String.Format("Login refused by region: {0}", reason);
278 m_log.InfoFormat(
279 "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region",
280 agentData.firstname, agentData.lastname);
281 }
282 } 253 }
283
284 }
285 else
286 {
287 denyMess = "Region not found";
288 } 254 }
289 255
290 if (success) 256 }
291 { 257 else
292 Hashtable respdata = new Hashtable(); 258 {
293 respdata["success"] = "TRUE"; 259 denyMess = "Region not found";
294 resp.Value = respdata; 260 }
295 } 261
296 else 262 if (success)
297 { 263 {
298 Hashtable respdata = new Hashtable(); 264 Hashtable respdata = new Hashtable();
299 respdata["success"] = "FALSE"; 265 respdata["success"] = "TRUE";
300 respdata["reason"] = denyMess; 266 resp.Value = respdata;
301 resp.Value = respdata; 267 }
302 } 268 else
269 {
270 Hashtable respdata = new Hashtable();
271 respdata["success"] = "FALSE";
272 respdata["reason"] = denyMess;
273 resp.Value = respdata;
303 } 274 }
304 } 275 }
305 catch (Exception e) 276 catch (Exception e)