diff options
Diffstat (limited to 'OpenSim/Region')
9 files changed, 42 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index c727cec..10a3232 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -557,7 +557,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
557 | 557 | ||
558 | // Call 'new user' event handler | 558 | // Call 'new user' event handler |
559 | string reason; | 559 | string reason; |
560 | if (!homeScene.NewUserConnection(agentData, out reason)) | 560 | if (!homeScene.NewUserConnection(agentData, (uint)TeleportFlags.ViaLogin, out reason)) |
561 | { | 561 | { |
562 | responseMap["connect"] = OSD.FromBoolean(false); | 562 | responseMap["connect"] = OSD.FromBoolean(false); |
563 | responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason)); | 563 | responseMap["message"] = OSD.FromString(String.Format("Connection refused: {0}", reason)); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs index bdfe3b1..d68c683 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/LocalInterregionComms.cs | |||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
144 | * Agent-related communications | 144 | * Agent-related communications |
145 | */ | 145 | */ |
146 | 146 | ||
147 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason) | 147 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
148 | { | 148 | { |
149 | 149 | ||
150 | foreach (Scene s in m_sceneList) | 150 | foreach (Scene s in m_sceneList) |
@@ -152,7 +152,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
152 | if (s.RegionInfo.RegionHandle == regionHandle) | 152 | if (s.RegionInfo.RegionHandle == regionHandle) |
153 | { | 153 | { |
154 | // m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); | 154 | // m_log.DebugFormat("[LOCAL COMMS]: Found region {0} to send SendCreateChildAgent", regionHandle); |
155 | return s.NewUserConnection(aCircuit, out reason); | 155 | return s.NewUserConnection(aCircuit, teleportFlags, out reason); |
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs index 710e3ca..44458d1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs | |||
@@ -157,10 +157,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
157 | * Agent-related communications | 157 | * Agent-related communications |
158 | */ | 158 | */ |
159 | 159 | ||
160 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason) | 160 | public bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason) |
161 | { | 161 | { |
162 | // Try local first | 162 | // Try local first |
163 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit, out reason)) | 163 | if (m_localBackend.SendCreateChildAgent(regionHandle, aCircuit, teleportFlags, out reason)) |
164 | return true; | 164 | return true; |
165 | 165 | ||
166 | // else do the remote thing | 166 | // else do the remote thing |
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
173 | { | 173 | { |
174 | m_regionClient.SendUserInformation(regInfo, aCircuit); | 174 | m_regionClient.SendUserInformation(regInfo, aCircuit); |
175 | 175 | ||
176 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None", out reason); | 176 | return m_regionClient.DoCreateChildAgentCall(regInfo, aCircuit, "None", teleportFlags, out reason); |
177 | } | 177 | } |
178 | //else | 178 | //else |
179 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); | 179 | // m_log.Warn("[REST COMMS]: Region not found " + regionHandle); |
@@ -436,11 +436,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion | |||
436 | } | 436 | } |
437 | 437 | ||
438 | OSDMap resp = new OSDMap(2); | 438 | OSDMap resp = new OSDMap(2); |
439 | string reason = String.Empty; | 439 | string reason = String.Empty; |
440 | 440 | uint teleportFlags = 0; | |
441 | if (args.ContainsKey("teleport_flags")) | ||
442 | { | ||
443 | teleportFlags = args["teleport_flags"].AsUInteger(); | ||
444 | } | ||
445 | |||
441 | // This is the meaning of POST agent | 446 | // This is the meaning of POST agent |
442 | m_regionClient.AdjustUserInformation(aCircuit); | 447 | m_regionClient.AdjustUserInformation(aCircuit); |
443 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit, out reason); | 448 | bool result = m_localBackend.SendCreateChildAgent(regionhandle, aCircuit, teleportFlags, out reason); |
444 | 449 | ||
445 | resp["reason"] = OSD.FromString(reason); | 450 | resp["reason"] = OSD.FromString(reason); |
446 | resp["success"] = OSD.FromBoolean(result); | 451 | resp["success"] = OSD.FromBoolean(result); |
diff --git a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs index 8f4d3d5..2d6287f 100644 --- a/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IInterregionComms.cs | |||
@@ -37,7 +37,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
37 | { | 37 | { |
38 | #region Agents | 38 | #region Agents |
39 | 39 | ||
40 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, out string reason); | 40 | bool SendCreateChildAgent(ulong regionHandle, AgentCircuitData aCircuit, uint teleportFlags, out string reason); |
41 | 41 | ||
42 | /// <summary> | 42 | /// <summary> |
43 | /// Full child agent update. | 43 | /// Full child agent update. |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index 0f9c190..416826c 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
203 | string reason = String.Empty; | 203 | string reason = String.Empty; |
204 | 204 | ||
205 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) | 205 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) |
206 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, out reason)) | 206 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, teleportFlags, out reason)) |
207 | { | 207 | { |
208 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", | 208 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", |
209 | reason)); | 209 | reason)); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f79eb5d..0e1e2be 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3316,12 +3316,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3316 | /// Use NewUserConnection() directly if possible so the return type can refuse connections. | 3316 | /// Use NewUserConnection() directly if possible so the return type can refuse connections. |
3317 | /// At the moment nothing actually seems to use this event, | 3317 | /// At the moment nothing actually seems to use this event, |
3318 | /// as everything is switching to calling the NewUserConnection method directly. | 3318 | /// as everything is switching to calling the NewUserConnection method directly. |
3319 | /// | ||
3320 | /// Now obsoleting this because it doesn't handle teleportFlags propertly | ||
3321 | /// | ||
3319 | /// </summary> | 3322 | /// </summary> |
3320 | /// <param name="agent"></param> | 3323 | /// <param name="agent"></param> |
3324 | [Obsolete("Please call NewUserConnection directly.")] | ||
3321 | public void HandleNewUserConnection(AgentCircuitData agent) | 3325 | public void HandleNewUserConnection(AgentCircuitData agent) |
3322 | { | 3326 | { |
3323 | string reason; | 3327 | string reason; |
3324 | NewUserConnection(agent, out reason); | 3328 | NewUserConnection(agent, 0, out reason); |
3325 | } | 3329 | } |
3326 | 3330 | ||
3327 | /// <summary> | 3331 | /// <summary> |
@@ -3334,8 +3338,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3334 | /// <param name="reason">Outputs the reason for the false response on this string</param> | 3338 | /// <param name="reason">Outputs the reason for the false response on this string</param> |
3335 | /// <returns>True if the region accepts this agent. False if it does not. False will | 3339 | /// <returns>True if the region accepts this agent. False if it does not. False will |
3336 | /// also return a reason.</returns> | 3340 | /// also return a reason.</returns> |
3337 | public bool NewUserConnection(AgentCircuitData agent, out string reason) | 3341 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) |
3338 | { | 3342 | { |
3343 | //Teleport flags: | ||
3344 | // | ||
3345 | // TeleportFlags.ViaGodlikeLure - Border Crossing | ||
3346 | // TeleportFlags.ViaLogin - Login | ||
3347 | // TeleportFlags.TeleportFlags.ViaLure - Teleport request sent by another user | ||
3348 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport | ||
3349 | |||
3350 | |||
3339 | if (loginsdisabled) | 3351 | if (loginsdisabled) |
3340 | { | 3352 | { |
3341 | reason = "Logins Disabled"; | 3353 | reason = "Logins Disabled"; |
@@ -3343,9 +3355,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3343 | } | 3355 | } |
3344 | // Don't disable this log message - it's too helpful | 3356 | // Don't disable this log message - it's too helpful |
3345 | m_log.InfoFormat( | 3357 | m_log.InfoFormat( |
3346 | "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5})", | 3358 | "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})", |
3347 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, | 3359 | RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, |
3348 | agent.AgentID, agent.circuitcode); | 3360 | agent.AgentID, agent.circuitcode, teleportFlags); |
3349 | 3361 | ||
3350 | reason = String.Empty; | 3362 | reason = String.Empty; |
3351 | if (!AuthenticateUser(agent, out reason)) | 3363 | if (!AuthenticateUser(agent, out reason)) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index e649139..f49d072 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
286 | string reason = String.Empty; | 286 | string reason = String.Empty; |
287 | 287 | ||
288 | 288 | ||
289 | bool regionAccepted = m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, out reason); | 289 | bool regionAccepted = m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, a, 0, out reason); |
290 | 290 | ||
291 | if (regionAccepted && newAgent) | 291 | if (regionAccepted && newAgent) |
292 | { | 292 | { |
@@ -810,7 +810,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
810 | 810 | ||
811 | // Let's create an agent there if one doesn't exist yet. | 811 | // Let's create an agent there if one doesn't exist yet. |
812 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) | 812 | //if (!m_commsProvider.InterRegion.InformRegionOfChildAgent(reg.RegionHandle, agentCircuit)) |
813 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, out reason)) | 813 | if (!m_interregionCommsOut.SendCreateChildAgent(reg.RegionHandle, agentCircuit, teleportFlags, out reason)) |
814 | { | 814 | { |
815 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", | 815 | avatar.ControllingClient.SendTeleportFailed(String.Format("Destination is not accepting teleports: {0}", |
816 | reason)); | 816 | reason)); |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs index f495022..f00dd66 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTests.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
117 | agent.child = true; | 117 | agent.child = true; |
118 | 118 | ||
119 | string reason; | 119 | string reason; |
120 | scene.NewUserConnection(agent, out reason); | 120 | scene.NewUserConnection(agent, (uint)TeleportFlags.ViaLogin, out reason); |
121 | testclient = new TestClient(agent, scene); | 121 | testclient = new TestClient(agent, scene); |
122 | scene.AddNewClient(testclient); | 122 | scene.AddNewClient(testclient); |
123 | 123 | ||
@@ -153,7 +153,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
153 | if (acd1 == null) | 153 | if (acd1 == null) |
154 | fixNullPresence(); | 154 | fixNullPresence(); |
155 | 155 | ||
156 | scene.NewUserConnection(acd1, out reason); | 156 | scene.NewUserConnection(acd1, 0, out reason); |
157 | if (testclient == null) | 157 | if (testclient == null) |
158 | testclient = new TestClient(acd1, scene); | 158 | testclient = new TestClient(acd1, scene); |
159 | scene.AddNewClient(testclient); | 159 | scene.AddNewClient(testclient); |
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
242 | 242 | ||
243 | // Adding child agent to region 1001 | 243 | // Adding child agent to region 1001 |
244 | string reason; | 244 | string reason; |
245 | scene2.NewUserConnection(acd1, out reason); | 245 | scene2.NewUserConnection(acd1,0, out reason); |
246 | scene2.AddNewClient(testclient); | 246 | scene2.AddNewClient(testclient); |
247 | 247 | ||
248 | ScenePresence presence = scene.GetScenePresence(agent1); | 248 | ScenePresence presence = scene.GetScenePresence(agent1); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 2b6d9bd..6102504 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6260,6 +6260,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6260 | LSLError("First parameter to llDialog needs to be a key"); | 6260 | LSLError("First parameter to llDialog needs to be a key"); |
6261 | return; | 6261 | return; |
6262 | } | 6262 | } |
6263 | if (buttons.Length < 1) | ||
6264 | { | ||
6265 | LSLError("No less than 1 button can be shown"); | ||
6266 | return; | ||
6267 | } | ||
6263 | if (buttons.Length > 12) | 6268 | if (buttons.Length > 12) |
6264 | { | 6269 | { |
6265 | LSLError("No more than 12 buttons can be shown"); | 6270 | LSLError("No more than 12 buttons can be shown"); |