aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/Linden
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
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')
-rw-r--r--OpenSim/Client/Linden/LLProxyLoginModule.cs103
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginModule.cs15
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginService.cs19
3 files changed, 44 insertions, 93 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)
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
index 8047f74..e51eace 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
@@ -56,21 +56,6 @@ namespace OpenSim.Client.Linden
56 protected bool authenticate; 56 protected bool authenticate;
57 protected string welcomeMessage; 57 protected string welcomeMessage;
58 58
59 public bool RegionLoginsEnabled
60 {
61 get
62 {
63 if (m_firstScene != null)
64 {
65 return m_firstScene.SceneGridService.RegionLoginsEnabled;
66 }
67 else
68 {
69 return false;
70 }
71 }
72 }
73
74 protected LLStandaloneLoginService m_loginService; 59 protected LLStandaloneLoginService m_loginService;
75 60
76 #region IRegionModule Members 61 #region IRegionModule Members
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
index 122110d..9ab043a 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
@@ -202,20 +202,15 @@ namespace OpenSim.Client.Linden
202 agent.Appearance = new AvatarAppearance(agent.AgentID); 202 agent.Appearance = new AvatarAppearance(agent.AgentID);
203 } 203 }
204 204
205 if (m_regionsConnector.RegionLoginsEnabled) 205 string reason;
206 bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason);
207 if (!success)
206 { 208 {
207 string reason; 209 response.ErrorReason = "key";
208 bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason); 210 response.ErrorMessage = reason;
209 if (!success)
210 {
211 response.ErrorReason = "key";
212 response.ErrorMessage = reason;
213 }
214 return success;
215 // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason);
216 } 211 }
217 212 return success;
218 return false; 213 // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason);
219 } 214 }
220 215
221 public override void LogOffUser(UserProfileData theUser, string message) 216 public override void LogOffUser(UserProfileData theUser, string message)