aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/Linden
diff options
context:
space:
mode:
authorDr Scofield2009-05-05 16:17:52 +0000
committerDr Scofield2009-05-05 16:17:52 +0000
commite0a06f641668cd5c25a7854af2faf8a61c4053ee (patch)
treec2a4620c4bdc0e479ca16528cd9e0524529a7998 /OpenSim/Client/Linden
parent* Fix http://opensimulator.org/mantis/view.php?id=3585 (diff)
downloadopensim-SC-e0a06f641668cd5c25a7854af2faf8a61c4053ee.zip
opensim-SC-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.gz
opensim-SC-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.bz2
opensim-SC-e0a06f641668cd5c25a7854af2faf8a61c4053ee.tar.xz
- moving banned check and public/private check to
Scene.NewUserConnection() - adding reason reporting this enforces estate bans very early on and prevents us from circulating client objects that we'd then have to retract once we realize that the client is not allowed into the region
Diffstat (limited to 'OpenSim/Client/Linden')
-rw-r--r--OpenSim/Client/Linden/LLProxyLoginModule.cs13
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginModule.cs5
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginService.cs10
3 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs
index 67d5f4c..fd8c4dd 100644
--- a/OpenSim/Client/Linden/LLProxyLoginModule.cs
+++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs
@@ -208,21 +208,22 @@ namespace OpenSim.Client.Linden
208 { 208 {
209 denyMess = "User is banned from this region"; 209 denyMess = "User is banned from this region";
210 m_log.InfoFormat( 210 m_log.InfoFormat(
211 "[CLIENT]: Denying access for user {0} {1} because user is banned", 211 "[CLIENT]: Denying access for user {0} {1} because user is banned",
212 agentData.firstname, agentData.lastname); 212 agentData.firstname, agentData.lastname);
213 } 213 }
214 else 214 else
215 { 215 {
216 if (scene.NewUserConnection(agentData)) 216 string reason;
217 if (scene.NewUserConnection(agentData, out reason))
217 { 218 {
218 success = true; 219 success = true;
219 } 220 }
220 else 221 else
221 { 222 {
222 denyMess = "Login refused by region"; 223 denyMess = String.Format("Login refused by region: {0}", reason);
223 m_log.InfoFormat( 224 m_log.InfoFormat(
224 "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region", 225 "[CLIENT]: Denying access for user {0} {1} because user connection was refused by the region",
225 agentData.firstname, agentData.lastname); 226 agentData.firstname, agentData.lastname);
226 } 227 }
227 } 228 }
228 229
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
index 00a6d05..dbc401b 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
@@ -154,13 +154,14 @@ namespace OpenSim.Client.Linden
154 } 154 }
155 } 155 }
156 156
157 public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent) 157 public bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason)
158 { 158 {
159 Scene scene; 159 Scene scene;
160 if (TryGetRegion(regionHandle, out scene)) 160 if (TryGetRegion(regionHandle, out scene))
161 { 161 {
162 return scene.NewUserConnection(agent); 162 return scene.NewUserConnection(agent, out reason);
163 } 163 }
164 reason = "Region not found.";
164 return false; 165 return false;
165 } 166 }
166 167
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
index 7316587..58b004a 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
@@ -201,7 +201,15 @@ namespace OpenSim.Client.Linden
201 201
202 if (m_regionsConnector.RegionLoginsEnabled) 202 if (m_regionsConnector.RegionLoginsEnabled)
203 { 203 {
204 return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent); 204 string reason;
205 bool success = m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason);
206 if (!success)
207 {
208 response.ErrorReason = "key";
209 response.ErrorMessage = reason;
210 }
211 return success;
212 // return m_regionsConnector.NewUserConnection(regionInfo.RegionHandle, agent, out reason);
205 } 213 }
206 214
207 return false; 215 return false;