diff options
author | UbitUmarov | 2014-07-16 16:22:32 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-16 16:22:32 +0100 |
commit | 19d33c571d8f48501ecb2409814d5b95b2b4be23 (patch) | |
tree | 8e08805a71ebea81de75b5805105f325e0defa0f /OpenSim/Region | |
parent | Merge branch 'avination-current' into ubitwork (diff) | |
parent | Merge branch 'avination-current' of ssh://3dhosting.de/var/git/careminster in... (diff) | |
download | opensim-SC-19d33c571d8f48501ecb2409814d5b95b2b4be23.zip opensim-SC-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.gz opensim-SC-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.bz2 opensim-SC-19d33c571d8f48501ecb2409814d5b95b2b4be23.tar.xz |
Merge branch 'avination-current' into ubitwork
Diffstat (limited to 'OpenSim/Region')
28 files changed, 297 insertions, 163 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 7361f50..88bd869 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -195,7 +195,9 @@ namespace OpenSim | |||
195 | 195 | ||
196 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); | 196 | m_securePermissionsLoading = startupConfig.GetBoolean("SecurePermissionsLoading", true); |
197 | 197 | ||
198 | string permissionModules = startupConfig.GetString("permissionmodules", "DefaultPermissionsModule"); | 198 | string permissionModules = Util.GetConfigVarFromSections<string>(Config, "permissionmodules", |
199 | new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); | ||
200 | |||
199 | m_permsModules = new List<string>(permissionModules.Split(',')); | 201 | m_permsModules = new List<string>(permissionModules.Split(',')); |
200 | } | 202 | } |
201 | 203 | ||
@@ -392,29 +394,19 @@ namespace OpenSim | |||
392 | } | 394 | } |
393 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); | 395 | else m_log.Error("[REGIONMODULES]: The new RegionModulesController is missing..."); |
394 | 396 | ||
395 | // XPTO: Fix this | 397 | if (m_securePermissionsLoading) |
396 | // if (m_securePermissionsLoading) | 398 | { |
397 | // { | 399 | foreach (string s in m_permsModules) |
398 | // foreach (string s in m_permsModules) | 400 | { |
399 | // { | 401 | if (!scene.RegionModules.ContainsKey(s)) |
400 | // if (!scene.RegionModules.ContainsKey(s)) | 402 | { |
401 | // { | 403 | m_log.Fatal("[MODULES]: Required module " + s + " not found."); |
402 | // bool found = false; | 404 | Environment.Exit(0); |
403 | // foreach (IRegionModule m in modules) | 405 | } |
404 | // { | 406 | } |
405 | // if (m.Name == s) | 407 | |
406 | // { | 408 | m_log.InfoFormat("[SCENE]: Secure permissions loading enabled, modules loaded: {0}", String.Join(" ", m_permsModules.ToArray())); |
407 | // found = true; | 409 | } |
408 | // } | ||
409 | // } | ||
410 | // if (!found) | ||
411 | // { | ||
412 | // m_log.Fatal("[MODULES]: Required module " + s + " not found."); | ||
413 | // Environment.Exit(0); | ||
414 | // } | ||
415 | // } | ||
416 | // } | ||
417 | // } | ||
418 | 410 | ||
419 | scene.SetModuleInterfaces(); | 411 | scene.SetModuleInterfaces(); |
420 | // First Step of bootreport sequence | 412 | // First Step of bootreport sequence |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 59b9585..8241e07 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -990,13 +990,20 @@ namespace OpenSim.Region.ClientStack.Linden | |||
990 | else | 990 | else |
991 | prim.Name = assetName + "#" + i.ToString(); | 991 | prim.Name = assetName + "#" + i.ToString(); |
992 | 992 | ||
993 | prim.EveryoneMask = 0; | ||
994 | prim.GroupMask = 0; | ||
995 | |||
993 | if (restrictPerms) | 996 | if (restrictPerms) |
994 | { | 997 | { |
995 | prim.BaseMask = (uint)(PermissionMask.Move | PermissionMask.Modify); | 998 | prim.BaseMask = (uint)(PermissionMask.Move | PermissionMask.Modify); |
996 | prim.EveryoneMask = 0; | ||
997 | prim.GroupMask = 0; | ||
998 | prim.NextOwnerMask = 0; | ||
999 | prim.OwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify); | 999 | prim.OwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify); |
1000 | prim.NextOwnerMask = 0; | ||
1001 | } | ||
1002 | else | ||
1003 | { | ||
1004 | prim.BaseMask = (uint)PermissionMask.All | (uint)PermissionMask.Export; | ||
1005 | prim.OwnerMask = (uint)PermissionMask.All | (uint)PermissionMask.Export; | ||
1006 | prim.NextOwnerMask = (uint)PermissionMask.Transfer; | ||
1000 | } | 1007 | } |
1001 | 1008 | ||
1002 | if(istest) | 1009 | if(istest) |
@@ -1099,21 +1106,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1099 | 1106 | ||
1100 | if (restrictPerms) | 1107 | if (restrictPerms) |
1101 | { | 1108 | { |
1102 | item.CurrentPermissions | ||
1103 | = (uint)(PermissionMask.Move | PermissionMask.Modify); | ||
1104 | |||
1105 | item.BasePermissions = (uint)(PermissionMask.Move | PermissionMask.Modify); | 1109 | item.BasePermissions = (uint)(PermissionMask.Move | PermissionMask.Modify); |
1110 | item.CurrentPermissions = (uint)(PermissionMask.Move | PermissionMask.Modify); | ||
1106 | item.EveryOnePermissions = 0; | 1111 | item.EveryOnePermissions = 0; |
1107 | item.NextPermissions = 0; | 1112 | item.NextPermissions = 0; |
1108 | } | 1113 | } |
1109 | else | 1114 | else |
1110 | { | 1115 | { |
1111 | item.CurrentPermissions | ||
1112 | = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export); | ||
1113 | |||
1114 | item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; | 1116 | item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; |
1117 | item.CurrentPermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; | ||
1115 | item.EveryOnePermissions = 0; | 1118 | item.EveryOnePermissions = 0; |
1116 | item.NextPermissions = (uint)PermissionMask.All; | 1119 | item.NextPermissions = (uint)PermissionMask.Transfer; |
1117 | } | 1120 | } |
1118 | 1121 | ||
1119 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 1122 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index a42c96c..0570144 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -77,6 +77,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
77 | private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>(); | 77 | private Dictionary<UUID, string> m_capsDict = new Dictionary<UUID, string>(); |
78 | private static Thread[] m_workerThreads = null; | 78 | private static Thread[] m_workerThreads = null; |
79 | 79 | ||
80 | private string m_Url = "localhost"; | ||
81 | |||
80 | private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue = | 82 | private static OpenMetaverse.BlockingQueue<aPollRequest> m_queue = |
81 | new OpenMetaverse.BlockingQueue<aPollRequest>(); | 83 | new OpenMetaverse.BlockingQueue<aPollRequest>(); |
82 | 84 | ||
@@ -86,6 +88,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
86 | 88 | ||
87 | public void Initialise(IConfigSource source) | 89 | public void Initialise(IConfigSource source) |
88 | { | 90 | { |
91 | IConfig config = source.Configs["ClientStack.LindenCaps"]; | ||
92 | if (config != null) | ||
93 | m_Url = config.GetString("Cap_GetTexture", "localhost"); | ||
89 | } | 94 | } |
90 | 95 | ||
91 | public void AddRegion(Scene s) | 96 | public void AddRegion(Scene s) |
@@ -343,27 +348,34 @@ namespace OpenSim.Region.ClientStack.Linden | |||
343 | 348 | ||
344 | private void RegisterCaps(UUID agentID, Caps caps) | 349 | private void RegisterCaps(UUID agentID, Caps caps) |
345 | { | 350 | { |
346 | string capUrl = "/CAPS/" + UUID.Random() + "/"; | 351 | if (m_Url == "localhost") |
347 | 352 | { | |
348 | // Register this as a poll service | 353 | string capUrl = "/CAPS/" + UUID.Random() + "/"; |
349 | PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); | 354 | |
350 | 355 | // Register this as a poll service | |
351 | args.Type = PollServiceEventArgs.EventType.Texture; | 356 | PollServiceTextureEventArgs args = new PollServiceTextureEventArgs(agentID, m_scene); |
352 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); | 357 | |
353 | 358 | args.Type = PollServiceEventArgs.EventType.Texture; | |
354 | string hostName = m_scene.RegionInfo.ExternalHostName; | 359 | MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); |
355 | uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; | 360 | |
356 | string protocol = "http"; | 361 | string hostName = m_scene.RegionInfo.ExternalHostName; |
357 | 362 | uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; | |
358 | if (MainServer.Instance.UseSSL) | 363 | string protocol = "http"; |
364 | |||
365 | if (MainServer.Instance.UseSSL) | ||
366 | { | ||
367 | hostName = MainServer.Instance.SSLCommonName; | ||
368 | port = MainServer.Instance.SSLPort; | ||
369 | protocol = "https"; | ||
370 | } | ||
371 | caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); | ||
372 | m_pollservices[agentID] = args; | ||
373 | m_capsDict[agentID] = capUrl; | ||
374 | } | ||
375 | else | ||
359 | { | 376 | { |
360 | hostName = MainServer.Instance.SSLCommonName; | 377 | caps.RegisterHandler("GetTexture", m_Url); |
361 | port = MainServer.Instance.SSLPort; | ||
362 | protocol = "https"; | ||
363 | } | 378 | } |
364 | caps.RegisterHandler("GetTexture", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); | ||
365 | m_pollservices[agentID] = args; | ||
366 | m_capsDict[agentID] = capUrl; | ||
367 | } | 379 | } |
368 | 380 | ||
369 | private void DeregisterCaps(UUID agentID, Caps caps) | 381 | private void DeregisterCaps(UUID agentID, Caps caps) |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index eebb8ae..7c62f90 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2233,9 +2233,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2233 | 2233 | ||
2234 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) | 2234 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) |
2235 | { | 2235 | { |
2236 | m_activeGroupID = activegroupid; | 2236 | if (agentid == AgentId) |
2237 | m_activeGroupName = groupname; | 2237 | { |
2238 | m_activeGroupPowers = grouppowers; | 2238 | m_activeGroupID = activegroupid; |
2239 | m_activeGroupName = groupname; | ||
2240 | m_activeGroupPowers = grouppowers; | ||
2241 | } | ||
2239 | 2242 | ||
2240 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); | 2243 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); |
2241 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; | 2244 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; |
@@ -3933,6 +3936,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3933 | part.Shape.ProfileHollow = 27500; | 3936 | part.Shape.ProfileHollow = 27500; |
3934 | } | 3937 | } |
3935 | } | 3938 | } |
3939 | else if (update.Entity is ScenePresence) | ||
3940 | { | ||
3941 | ScenePresence presence = (ScenePresence)update.Entity; | ||
3942 | |||
3943 | // If ParentUUID is not UUID.Zero and ParentID is 0, this | ||
3944 | // avatar is in the process of crossing regions while | ||
3945 | // sat on an object. In this state, we don't want any | ||
3946 | // updates because they will visually orbit the avatar. | ||
3947 | // Update will be forced once crossing is completed anyway. | ||
3948 | if (presence.ParentUUID != UUID.Zero && presence.ParentID == 0) | ||
3949 | continue; | ||
3950 | } | ||
3936 | 3951 | ||
3937 | ++updatesThisCall; | 3952 | ++updatesThisCall; |
3938 | 3953 | ||
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 853b72d..287c278 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -100,13 +100,25 @@ namespace OpenSim.Region.ClientStack | |||
100 | // "OOB" Server | 100 | // "OOB" Server |
101 | if (m_networkServersInfo.ssl_listener) | 101 | if (m_networkServersInfo.ssl_listener) |
102 | { | 102 | { |
103 | BaseHttpServer server = new BaseHttpServer( | 103 | if (!m_networkServersInfo.ssl_external) |
104 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | 104 | { |
105 | m_networkServersInfo.cert_pass); | 105 | BaseHttpServer server = new BaseHttpServer( |
106 | m_networkServersInfo.https_port, m_networkServersInfo.ssl_listener, m_networkServersInfo.cert_path, | ||
107 | m_networkServersInfo.cert_pass); | ||
106 | 108 | ||
107 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); | 109 | m_log.InfoFormat("[REGION SERVER]: Starting HTTPS server on port {0}", server.Port); |
108 | MainServer.AddHttpServer(server); | 110 | MainServer.AddHttpServer(server); |
109 | server.Start(); | 111 | server.Start(); |
112 | } | ||
113 | else | ||
114 | { | ||
115 | BaseHttpServer server = new BaseHttpServer( | ||
116 | m_networkServersInfo.https_port); | ||
117 | |||
118 | m_log.InfoFormat("[REGION SERVER]: Starting HTTP server on port {0} for external HTTPS", server.Port); | ||
119 | MainServer.AddHttpServer(server); | ||
120 | server.Start(); | ||
121 | } | ||
110 | } | 122 | } |
111 | 123 | ||
112 | base.StartupSpecific(); | 124 | base.StartupSpecific(); |
@@ -132,4 +144,4 @@ namespace OpenSim.Region.ClientStack | |||
132 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); | 144 | return physicsPluginManager.GetPhysicsScene(engine, meshEngine, config, osSceneIdentifier); |
133 | } | 145 | } |
134 | } | 146 | } |
135 | } \ No newline at end of file | 147 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f2f789b..6495f3f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -302,7 +302,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
302 | // If we're an NPC then skip all the item checks and manipulations since we don't have an | 302 | // If we're an NPC then skip all the item checks and manipulations since we don't have an |
303 | // inventory right now. | 303 | // inventory right now. |
304 | RezSingleAttachmentFromInventoryInternal( | 304 | RezSingleAttachmentFromInventoryInternal( |
305 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, null); | 305 | sp, sp.PresenceType == PresenceType.Npc ? UUID.Zero : attach.ItemID, attach.AssetID, p, true, d); |
306 | } | 306 | } |
307 | catch (Exception e) | 307 | catch (Exception e) |
308 | { | 308 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs index 343cdb5..c52d586 100644 --- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs | |||
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule | |||
182 | try | 182 | try |
183 | { | 183 | { |
184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); | 184 | ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); |
185 | if (obj == null) | ||
186 | return; | ||
185 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 | 187 | if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 |
186 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) | 188 | || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) |
187 | { | 189 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 2d46276..41958b3 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -40,6 +40,13 @@ using OpenSim.Region.Framework.Scenes; | |||
40 | 40 | ||
41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 41 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
42 | { | 42 | { |
43 | public struct SendReply | ||
44 | { | ||
45 | public bool Success; | ||
46 | public string Message; | ||
47 | public int Disposition; | ||
48 | } | ||
49 | |||
43 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "OfflineMessageModule")] |
44 | public class OfflineMessageModule : ISharedRegionModule | 51 | public class OfflineMessageModule : ISharedRegionModule |
45 | { | 52 | { |
@@ -50,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
50 | private string m_RestURL = String.Empty; | 57 | private string m_RestURL = String.Empty; |
51 | IMessageTransferModule m_TransferModule = null; | 58 | IMessageTransferModule m_TransferModule = null; |
52 | private bool m_ForwardOfflineGroupMessages = true; | 59 | private bool m_ForwardOfflineGroupMessages = true; |
60 | private Dictionary<IClientAPI, List<UUID>> m_repliesSent= new Dictionary<IClientAPI, List<UUID>>(); | ||
53 | 61 | ||
54 | public void Initialise(IConfigSource config) | 62 | public void Initialise(IConfigSource config) |
55 | { | 63 | { |
@@ -169,6 +177,12 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
169 | private void OnNewClient(IClientAPI client) | 177 | private void OnNewClient(IClientAPI client) |
170 | { | 178 | { |
171 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; | 179 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; |
180 | client.OnLogout += OnClientLoggedOut; | ||
181 | } | ||
182 | |||
183 | public void OnClientLoggedOut(IClientAPI client) | ||
184 | { | ||
185 | m_repliesSent.Remove(client); | ||
172 | } | 186 | } |
173 | 187 | ||
174 | private void RetrieveInstantMessages(IClientAPI client) | 188 | private void RetrieveInstantMessages(IClientAPI client) |
@@ -228,7 +242,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
228 | if (scene == null) | 242 | if (scene == null) |
229 | scene = m_SceneList[0]; | 243 | scene = m_SceneList[0]; |
230 | 244 | ||
231 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 245 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
232 | "POST", m_RestURL+"/SaveMessage/?scope=" + | 246 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
233 | scene.RegionInfo.ScopeID.ToString(), im); | 247 | scene.RegionInfo.ScopeID.ToString(), im); |
234 | 248 | ||
@@ -238,13 +252,38 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
238 | if (client == null) | 252 | if (client == null) |
239 | return; | 253 | return; |
240 | 254 | ||
241 | client.SendInstantMessage(new GridInstantMessage( | 255 | if (reply.Message == String.Empty) |
242 | null, new UUID(im.toAgentID), | 256 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
243 | "System", new UUID(im.fromAgentID), | 257 | |
244 | (byte)InstantMessageDialog.MessageFromAgent, | 258 | bool sendReply = true; |
245 | "User is not logged in. "+ | 259 | |
246 | (success ? "Message saved." : "Message not saved"), | 260 | switch (reply.Disposition) |
247 | false, new Vector3())); | 261 | { |
262 | case 0: // Normal | ||
263 | break; | ||
264 | case 1: // Only once per user | ||
265 | if (m_repliesSent.ContainsKey(client) && m_repliesSent[client].Contains(new UUID(im.toAgentID))) | ||
266 | { | ||
267 | sendReply = false; | ||
268 | } | ||
269 | else | ||
270 | { | ||
271 | if (!m_repliesSent.ContainsKey(client)) | ||
272 | m_repliesSent[client] = new List<UUID>(); | ||
273 | m_repliesSent[client].Add(new UUID(im.toAgentID)); | ||
274 | } | ||
275 | break; | ||
276 | } | ||
277 | |||
278 | if (sendReply) | ||
279 | { | ||
280 | client.SendInstantMessage(new GridInstantMessage( | ||
281 | null, new UUID(im.toAgentID), | ||
282 | "System", new UUID(im.fromAgentID), | ||
283 | (byte)InstantMessageDialog.MessageFromAgent, | ||
284 | reply.Message, | ||
285 | false, new Vector3())); | ||
286 | } | ||
248 | } | 287 | } |
249 | } | 288 | } |
250 | } | 289 | } |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index a606d76..193a27b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -265,7 +265,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
265 | return UUID.Zero; | 265 | return UUID.Zero; |
266 | } | 266 | } |
267 | 267 | ||
268 | remoteClient.SendAgentAlertMessage("Notecard saved", false); | 268 | remoteClient.SendAlertMessage("Notecard saved"); |
269 | } | 269 | } |
270 | else if ((InventoryType)item.InvType == InventoryType.LSL) | 270 | else if ((InventoryType)item.InvType == InventoryType.LSL) |
271 | { | 271 | { |
@@ -275,7 +275,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
275 | return UUID.Zero; | 275 | return UUID.Zero; |
276 | } | 276 | } |
277 | 277 | ||
278 | remoteClient.SendAgentAlertMessage("Script saved", false); | 278 | remoteClient.SendAlertMessage("Script saved"); |
279 | } | 279 | } |
280 | 280 | ||
281 | AssetBase asset = | 281 | AssetBase asset = |
@@ -799,6 +799,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
799 | XmlDocument doc = new XmlDocument(); | 799 | XmlDocument doc = new XmlDocument(); |
800 | doc.LoadXml(xmlData); | 800 | doc.LoadXml(xmlData); |
801 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); | 801 | XmlElement e = (XmlElement)doc.SelectSingleNode("/CoalescedObject"); |
802 | Vector3 rez_pos; | ||
802 | if (e == null || attachment) // Single | 803 | if (e == null || attachment) // Single |
803 | { | 804 | { |
804 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 805 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); |
@@ -820,6 +821,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
820 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, | 821 | RayStart, RayEnd, RayTargetID, Quaternion.Identity, |
821 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); | 822 | BypassRayCast, bRayEndIsIntersection, true, g.GetAxisAlignedBoundingBox(out offsetHeight), false); |
822 | pos.Z += offsetHeight; | 823 | pos.Z += offsetHeight; |
824 | rez_pos = pos; | ||
823 | } | 825 | } |
824 | else | 826 | else |
825 | { | 827 | { |
@@ -834,6 +836,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
834 | BypassRayCast, bRayEndIsIntersection, true, | 836 | BypassRayCast, bRayEndIsIntersection, true, |
835 | bbox, false); | 837 | bbox, false); |
836 | 838 | ||
839 | rez_pos = pos; | ||
840 | |||
837 | pos -= bbox / 2; | 841 | pos -= bbox / 2; |
838 | 842 | ||
839 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); | 843 | XmlNodeList groups = e.SelectNodes("SceneObjectGroup"); |
@@ -870,7 +874,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
870 | primcount += g.PrimCount; | 874 | primcount += g.PrimCount; |
871 | 875 | ||
872 | if (!m_Scene.Permissions.CanRezObject( | 876 | if (!m_Scene.Permissions.CanRezObject( |
873 | primcount, remoteClient.AgentId, pos) | 877 | primcount, remoteClient.AgentId, rez_pos) |
874 | && !attachment) | 878 | && !attachment) |
875 | { | 879 | { |
876 | // The client operates in no fail mode. It will | 880 | // The client operates in no fail mode. It will |
@@ -887,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
887 | return null; | 891 | return null; |
888 | } | 892 | } |
889 | 893 | ||
890 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) | 894 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, rez_pos, attachment)) |
891 | return null; | 895 | return null; |
892 | 896 | ||
893 | for (int i = 0; i < objlist.Count; i++) | 897 | for (int i = 0; i < objlist.Count; i++) |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index a5f5749..834fd77 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -96,6 +96,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
96 | 96 | ||
97 | m_commands = new EstateManagementCommands(this); | 97 | m_commands = new EstateManagementCommands(this); |
98 | m_commands.Initialise(); | 98 | m_commands.Initialise(); |
99 | |||
100 | m_regionChangeTimer.Interval = 10000; | ||
101 | m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; | ||
102 | m_regionChangeTimer.AutoReset = false; | ||
99 | } | 103 | } |
100 | 104 | ||
101 | public void RemoveRegion(Scene scene) {} | 105 | public void RemoveRegion(Scene scene) {} |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index c307998..4e21724 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -565,7 +565,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
565 | requiredPowers = GroupPowers.LandManageBanned; | 565 | requiredPowers = GroupPowers.LandManageBanned; |
566 | 566 | ||
567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, | 567 | if (m_scene.Permissions.CanEditParcelProperties(agentID, |
568 | land, requiredPowers)) | 568 | land, requiredPowers, false)) |
569 | { | 569 | { |
570 | land.UpdateAccessList(flags, transactionID, sequenceID, | 570 | land.UpdateAccessList(flags, transactionID, sequenceID, |
571 | sections, entries, remote_client); | 571 | sections, entries, remote_client); |
@@ -927,7 +927,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
927 | 927 | ||
928 | //If we are still here, then they are subdividing within one piece of land | 928 | //If we are still here, then they are subdividing within one piece of land |
929 | //Check owner | 929 | //Check owner |
930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin)) | 930 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true)) |
931 | { | 931 | { |
932 | return; | 932 | return; |
933 | } | 933 | } |
@@ -996,7 +996,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
996 | { | 996 | { |
997 | return; | 997 | return; |
998 | } | 998 | } |
999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin)) | 999 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, masterLandObject, GroupPowers.LandDivideJoin, true)) |
1000 | { | 1000 | { |
1001 | return; | 1001 | return; |
1002 | } | 1002 | } |
@@ -1727,7 +1727,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1727 | 1727 | ||
1728 | if (land == null) return; | 1728 | if (land == null) return; |
1729 | 1729 | ||
1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions)) | 1730 | if (!m_scene.Permissions.CanEditParcelProperties(remoteClient.AgentId, land, GroupPowers.LandOptions, false)) |
1731 | return; | 1731 | return; |
1732 | 1732 | ||
1733 | land.LandData.OtherCleanTime = otherCleanTime; | 1733 | land.LandData.OtherCleanTime = otherCleanTime; |
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1827 | if (targetAvatar.UserLevel == 0) | 1827 | if (targetAvatar.UserLevel == 0) |
1828 | { | 1828 | { |
1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1829 | ILandObject land = ((Scene)client.Scene).LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze)) | 1830 | if (!((Scene)client.Scene).Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true)) |
1831 | return; | 1831 | return; |
1832 | if (flags == 0) | 1832 | if (flags == 0) |
1833 | { | 1833 | { |
@@ -1876,7 +1876,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1876 | 1876 | ||
1877 | // Check if you even have permission to do this | 1877 | // Check if you even have permission to do this |
1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); | 1878 | ILandObject land = m_scene.LandChannel.GetLandObject(targetAvatar.AbsolutePosition.X, targetAvatar.AbsolutePosition.Y); |
1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze) && | 1879 | if (!m_scene.Permissions.CanEditParcelProperties(client.AgentId, land, GroupPowers.LandEjectAndFreeze, true) && |
1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) | 1880 | !m_scene.Permissions.IsAdministrator(client.AgentId)) |
1881 | return; | 1881 | return; |
1882 | 1882 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 07d00c0..2eafd44 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
286 | // ParcelFlags.ForSaleObjects | 286 | // ParcelFlags.ForSaleObjects |
287 | // ParcelFlags.LindenHome | 287 | // ParcelFlags.LindenHome |
288 | 288 | ||
289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 289 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, false)) |
290 | { | 290 | { |
291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | | 291 | allowedDelta |= (uint)(ParcelFlags.AllowLandmark | |
292 | ParcelFlags.AllowTerraform | | 292 | ParcelFlags.AllowTerraform | |
@@ -301,7 +301,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
301 | ParcelFlags.AllowFly); | 301 | ParcelFlags.AllowFly); |
302 | } | 302 | } |
303 | 303 | ||
304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale)) | 304 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandSetSale, true)) |
305 | { | 305 | { |
306 | if (args.AuthBuyerID != newData.AuthBuyerID || | 306 | if (args.AuthBuyerID != newData.AuthBuyerID || |
307 | args.SalePrice != newData.SalePrice) | 307 | args.SalePrice != newData.SalePrice) |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
324 | allowedDelta |= (uint)ParcelFlags.ForSale; | 324 | allowedDelta |= (uint)ParcelFlags.ForSale; |
325 | } | 325 | } |
326 | 326 | ||
327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces)) | 327 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.FindPlaces, false)) |
328 | { | 328 | { |
329 | newData.Category = args.Category; | 329 | newData.Category = args.Category; |
330 | 330 | ||
@@ -333,21 +333,21 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); | 333 | ParcelFlags.MaturePublish) | (uint)(1 << 23); |
334 | } | 334 | } |
335 | 335 | ||
336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity)) | 336 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandChangeIdentity, false)) |
337 | { | 337 | { |
338 | newData.Description = args.Desc; | 338 | newData.Description = args.Desc; |
339 | newData.Name = args.Name; | 339 | newData.Name = args.Name; |
340 | newData.SnapshotID = args.SnapshotID; | 340 | newData.SnapshotID = args.SnapshotID; |
341 | } | 341 | } |
342 | 342 | ||
343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint)) | 343 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.SetLandingPoint, false)) |
344 | { | 344 | { |
345 | newData.LandingType = args.LandingType; | 345 | newData.LandingType = args.LandingType; |
346 | newData.UserLocation = args.UserLocation; | 346 | newData.UserLocation = args.UserLocation; |
347 | newData.UserLookAt = args.UserLookAt; | 347 | newData.UserLookAt = args.UserLookAt; |
348 | } | 348 | } |
349 | 349 | ||
350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia)) | 350 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.ChangeMedia, false)) |
351 | { | 351 | { |
352 | newData.MediaAutoScale = args.MediaAutoScale; | 352 | newData.MediaAutoScale = args.MediaAutoScale; |
353 | newData.MediaID = args.MediaID; | 353 | newData.MediaID = args.MediaID; |
@@ -368,7 +368,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
368 | ParcelFlags.UseEstateVoiceChan); | 368 | ParcelFlags.UseEstateVoiceChan); |
369 | } | 369 | } |
370 | 370 | ||
371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses)) | 371 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId,this, GroupPowers.LandManagePasses, false)) |
372 | { | 372 | { |
373 | newData.PassHours = args.PassHours; | 373 | newData.PassHours = args.PassHours; |
374 | newData.PassPrice = args.PassPrice; | 374 | newData.PassPrice = args.PassPrice; |
@@ -376,25 +376,27 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
376 | allowedDelta |= (uint)ParcelFlags.UsePassList; | 376 | allowedDelta |= (uint)ParcelFlags.UsePassList; |
377 | } | 377 | } |
378 | 378 | ||
379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed)) | 379 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageAllowed, false)) |
380 | { | 380 | { |
381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | | 381 | allowedDelta |= (uint)(ParcelFlags.UseAccessGroup | |
382 | ParcelFlags.UseAccessList); | 382 | ParcelFlags.UseAccessList); |
383 | } | 383 | } |
384 | 384 | ||
385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned)) | 385 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandManageBanned, false)) |
386 | { | 386 | { |
387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | | 387 | allowedDelta |= (uint)(ParcelFlags.UseBanList | |
388 | ParcelFlags.DenyAnonymous | | 388 | ParcelFlags.DenyAnonymous | |
389 | ParcelFlags.DenyAgeUnverified); | 389 | ParcelFlags.DenyAgeUnverified); |
390 | } | 390 | } |
391 | 391 | ||
392 | uint preserve = LandData.Flags & ~allowedDelta; | 392 | if (allowedDelta != (uint)ParcelFlags.None) |
393 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); | 393 | { |
394 | 394 | uint preserve = LandData.Flags & ~allowedDelta; | |
395 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 395 | newData.Flags = preserve | (args.ParcelFlags & allowedDelta); |
396 | 396 | ||
397 | SendLandUpdateToAvatarsOverMe(snap_selection); | 397 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
398 | SendLandUpdateToAvatarsOverMe(snap_selection); | ||
399 | } | ||
398 | } | 400 | } |
399 | 401 | ||
400 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) | 402 | public void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) |
@@ -950,7 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
950 | 952 | ||
951 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) | 953 | public void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client) |
952 | { | 954 | { |
953 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 955 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
954 | { | 956 | { |
955 | List<uint> resultLocalIDs = new List<uint>(); | 957 | List<uint> resultLocalIDs = new List<uint>(); |
956 | try | 958 | try |
@@ -1000,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1000 | /// </param> | 1002 | /// </param> |
1001 | public void SendLandObjectOwners(IClientAPI remote_client) | 1003 | public void SendLandObjectOwners(IClientAPI remote_client) |
1002 | { | 1004 | { |
1003 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions)) | 1005 | if (m_scene.Permissions.CanEditParcelProperties(remote_client.AgentId, this, GroupPowers.LandOptions, true)) |
1004 | { | 1006 | { |
1005 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); | 1007 | Dictionary<UUID, int> primCount = new Dictionary<UUID, int>(); |
1006 | List<UUID> groups = new List<UUID>(); | 1008 | List<UUID> groups = new List<UUID>(); |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 79dd4a0..4f5b9b7 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -42,8 +42,8 @@ using PermissionMask = OpenSim.Framework.PermissionMask; | |||
42 | 42 | ||
43 | namespace OpenSim.Region.CoreModules.World.Permissions | 43 | namespace OpenSim.Region.CoreModules.World.Permissions |
44 | { | 44 | { |
45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "PermissionsModule")] | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "DefaultPermissionsModule")] |
46 | public class PermissionsModule : INonSharedRegionModule, IPermissionsModule | 46 | public class DefaultPermissionsModule : INonSharedRegionModule, IPermissionsModule |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
348 | 348 | ||
349 | public string Name | 349 | public string Name |
350 | { | 350 | { |
351 | get { return "PermissionsModule"; } | 351 | get { return "DefaultPermissionsModule"; } |
352 | } | 352 | } |
353 | 353 | ||
354 | public Type ReplaceableInterface | 354 | public Type ReplaceableInterface |
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1047 | return GenericObjectPermission(editorID, objectID, false); | 1047 | return GenericObjectPermission(editorID, objectID, false); |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene) | 1050 | private bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager) |
1051 | { | 1051 | { |
1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1052 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1053 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 09481a7..f0e639d 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -662,7 +662,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
662 | 662 | ||
663 | // Do the frame processing | 663 | // Do the frame processing |
664 | double steps = (double)m_currentFrame.TimeMS / tickDuration; | 664 | double steps = (double)m_currentFrame.TimeMS / tickDuration; |
665 | 665 | ||
666 | if (steps <= 0.0) | 666 | if (steps <= 0.0) |
667 | { | 667 | { |
668 | m_group.RootPart.Velocity = Vector3.Zero; | 668 | m_group.RootPart.Velocity = Vector3.Zero; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 535d87a..4d90726 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); | 70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); |
71 | public delegate bool IsAdministratorHandler(UUID user); | 71 | public delegate bool IsAdministratorHandler(UUID user); |
72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); | 72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); |
73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene); | 73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager); |
74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); | 74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); |
75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); | 75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); |
76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); | 76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); |
@@ -763,7 +763,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
763 | 763 | ||
764 | #region EDIT PARCEL | 764 | #region EDIT PARCEL |
765 | 765 | ||
766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p) | 766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, bool allowManager) |
767 | { | 767 | { |
768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; | 768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; |
769 | if (handler != null) | 769 | if (handler != null) |
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
771 | Delegate[] list = handler.GetInvocationList(); | 771 | Delegate[] list = handler.GetInvocationList(); |
772 | foreach (EditParcelPropertiesHandler h in list) | 772 | foreach (EditParcelPropertiesHandler h in list) |
773 | { | 773 | { |
774 | if (h(user, parcel, p, m_scene) == false) | 774 | if (h(user, parcel, p, m_scene, allowManager) == false) |
775 | return false; | 775 | return false; |
776 | } | 776 | } |
777 | } | 777 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2b58795..b189599 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2802,8 +2802,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2802 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | 2802 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); |
2803 | newObject.ResumeScripts(); | 2803 | newObject.ResumeScripts(); |
2804 | 2804 | ||
2805 | if (newObject.RootPart.KeyframeMotion != null) | 2805 | // AddSceneObject already does this and doing it again messes |
2806 | newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); | 2806 | // up region crossings, so don't. |
2807 | //if (newObject.RootPart.KeyframeMotion != null) | ||
2808 | // newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); | ||
2807 | } | 2809 | } |
2808 | 2810 | ||
2809 | // Do this as late as possible so that listeners have full access to the incoming object | 2811 | // Do this as late as possible so that listeners have full access to the incoming object |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0ea4e09..86f60bb 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -591,6 +591,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
591 | avinfo.ParentID = av.ParentID; | 591 | avinfo.ParentID = av.ParentID; |
592 | avsToCross.Add(avinfo); | 592 | avsToCross.Add(avinfo); |
593 | 593 | ||
594 | av.PrevSitOffset = av.OffsetPosition; | ||
594 | av.ParentID = 0; | 595 | av.ParentID = 0; |
595 | } | 596 | } |
596 | 597 | ||
@@ -1072,6 +1073,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1072 | for (int i = 0; i < parts.Length; i++) | 1073 | for (int i = 0; i < parts.Length; i++) |
1073 | { | 1074 | { |
1074 | SceneObjectPart part = parts[i]; | 1075 | SceneObjectPart part = parts[i]; |
1076 | if (part.KeyframeMotion != null) | ||
1077 | { | ||
1078 | part.KeyframeMotion.UpdateSceneObject(this); | ||
1079 | } | ||
1080 | |||
1075 | if (Object.ReferenceEquals(part, m_rootPart)) | 1081 | if (Object.ReferenceEquals(part, m_rootPart)) |
1076 | continue; | 1082 | continue; |
1077 | 1083 | ||
@@ -1880,25 +1886,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1880 | { | 1886 | { |
1881 | SceneObjectPart part = parts[i]; | 1887 | SceneObjectPart part = parts[i]; |
1882 | 1888 | ||
1883 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) | 1889 | if (Scene != null) |
1884 | { | 1890 | { |
1885 | if (avatar.ParentID == LocalId) | 1891 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) |
1886 | avatar.StandUp(); | ||
1887 | |||
1888 | if (!silent) | ||
1889 | { | 1892 | { |
1890 | part.ClearUpdateSchedule(); | 1893 | if (avatar.ParentID == LocalId) |
1891 | if (part == m_rootPart) | 1894 | avatar.StandUp(); |
1895 | |||
1896 | if (!silent) | ||
1892 | { | 1897 | { |
1893 | if (!IsAttachment | 1898 | part.ClearUpdateSchedule(); |
1894 | || AttachedAvatar == avatar.ControllingClient.AgentId | 1899 | if (part == m_rootPart) |
1895 | || !HasPrivateAttachmentPoint) | 1900 | { |
1896 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | 1901 | if (!IsAttachment |
1902 | || AttachedAvatar == avatar.ControllingClient.AgentId | ||
1903 | || !HasPrivateAttachmentPoint) | ||
1904 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | ||
1905 | } | ||
1897 | } | 1906 | } |
1898 | } | 1907 | }); |
1899 | }); | 1908 | } |
1900 | } | 1909 | } |
1901 | |||
1902 | } | 1910 | } |
1903 | 1911 | ||
1904 | public void AddScriptLPS(int count) | 1912 | public void AddScriptLPS(int count) |
@@ -3483,8 +3491,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3483 | part.ClonePermissions(RootPart); | 3491 | part.ClonePermissions(RootPart); |
3484 | }); | 3492 | }); |
3485 | 3493 | ||
3486 | uint lockMask = ~(uint)PermissionMask.Move; | 3494 | uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify); |
3487 | uint lockBit = RootPart.OwnerMask & (uint)PermissionMask.Move; | 3495 | uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify); |
3488 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); | 3496 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); |
3489 | RootPart.ScheduleFullUpdate(); | 3497 | RootPart.ScheduleFullUpdate(); |
3490 | } | 3498 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0ab267a..7004d23 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
242 | 242 | ||
243 | private int m_movementAnimationUpdateCounter = 0; | 243 | private int m_movementAnimationUpdateCounter = 0; |
244 | 244 | ||
245 | private Vector3 m_prevSitOffset; | 245 | public Vector3 PrevSitOffset { get; set; } |
246 | 246 | ||
247 | protected AvatarAppearance m_appearance; | 247 | protected AvatarAppearance m_appearance; |
248 | 248 | ||
@@ -957,7 +957,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
957 | // ParentPosition = part.GetWorldPosition(); | 957 | // ParentPosition = part.GetWorldPosition(); |
958 | ParentID = part.LocalId; | 958 | ParentID = part.LocalId; |
959 | ParentPart = part; | 959 | ParentPart = part; |
960 | m_pos = m_prevSitOffset; | 960 | m_pos = PrevSitOffset; |
961 | // pos = ParentPosition; | 961 | // pos = ParentPosition; |
962 | pos = part.GetWorldPosition(); | 962 | pos = part.GetWorldPosition(); |
963 | } | 963 | } |
@@ -2261,6 +2261,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2261 | 2261 | ||
2262 | if (ParentID != 0) | 2262 | if (ParentID != 0) |
2263 | { | 2263 | { |
2264 | PrevSitOffset = m_pos; // Save sit offset | ||
2264 | SceneObjectPart part = ParentPart; | 2265 | SceneObjectPart part = ParentPart; |
2265 | UnRegisterSeatControls(part.ParentGroup.UUID); | 2266 | UnRegisterSeatControls(part.ParentGroup.UUID); |
2266 | 2267 | ||
@@ -3487,7 +3488,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3487 | cAgent.Appearance = new AvatarAppearance(Appearance); | 3488 | cAgent.Appearance = new AvatarAppearance(Appearance); |
3488 | 3489 | ||
3489 | cAgent.ParentPart = ParentUUID; | 3490 | cAgent.ParentPart = ParentUUID; |
3490 | cAgent.SitOffset = m_pos; | 3491 | cAgent.SitOffset = PrevSitOffset; |
3491 | 3492 | ||
3492 | lock (scriptedcontrols) | 3493 | lock (scriptedcontrols) |
3493 | { | 3494 | { |
@@ -3530,7 +3531,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3530 | CameraLeftAxis = cAgent.LeftAxis; | 3531 | CameraLeftAxis = cAgent.LeftAxis; |
3531 | CameraUpAxis = cAgent.UpAxis; | 3532 | CameraUpAxis = cAgent.UpAxis; |
3532 | ParentUUID = cAgent.ParentPart; | 3533 | ParentUUID = cAgent.ParentPart; |
3533 | m_prevSitOffset = cAgent.SitOffset; | 3534 | PrevSitOffset = cAgent.SitOffset; |
3534 | 3535 | ||
3535 | // When we get to the point of re-computing neighbors everytime this | 3536 | // When we get to the point of re-computing neighbors everytime this |
3536 | // changes, then start using the agent's drawdistance rather than the | 3537 | // changes, then start using the agent's drawdistance rather than the |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs index 52ad538..9557cd0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
67 | IConfigSource configSource = new IniConfigSource(); | 67 | IConfigSource configSource = new IniConfigSource(); |
68 | IConfig config = configSource.AddConfig("Startup"); | 68 | IConfig config = configSource.AddConfig("Startup"); |
69 | config.Set("serverside_object_permissions", true); | 69 | config.Set("serverside_object_permissions", true); |
70 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); | 70 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
71 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 71 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
72 | 72 | ||
73 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 73 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
112 | IConfigSource configSource = new IniConfigSource(); | 112 | IConfigSource configSource = new IniConfigSource(); |
113 | IConfig config = configSource.AddConfig("Startup"); | 113 | IConfig config = configSource.AddConfig("Startup"); |
114 | config.Set("serverside_object_permissions", true); | 114 | config.Set("serverside_object_permissions", true); |
115 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); | 115 | SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() }); |
116 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; | 116 | IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; |
117 | 117 | ||
118 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | 118 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. |
@@ -195,4 +195,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
195 | // Assert.That(retrievedPart, Is.Null); | 195 | // Assert.That(retrievedPart, Is.Null); |
196 | } | 196 | } |
197 | } | 197 | } |
198 | } \ No newline at end of file | 198 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs index c7eaff9..e7a1fe0 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
71 | 71 | ||
72 | SceneHelpers.SetupSceneModules( | 72 | SceneHelpers.SetupSceneModules( |
73 | scene, configSource, new object[] | 73 | scene, configSource, new object[] |
74 | { new PermissionsModule(), | 74 | { new DefaultPermissionsModule(), |
75 | new GroupsModule(), | 75 | new GroupsModule(), |
76 | new MockGroupsServicesConnector() }); | 76 | new MockGroupsServicesConnector() }); |
77 | 77 | ||
@@ -82,4 +82,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
82 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); | 82 | groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); |
83 | } | 83 | } |
84 | } | 84 | } |
85 | } \ No newline at end of file | 85 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index de4458d..8d94d29 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
216 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 216 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
217 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 217 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
218 | // IsAdministrator if no permissions module is present is true. | 218 | // IsAdministrator if no permissions module is present is true. |
219 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 219 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
220 | 220 | ||
221 | // Shared scene modules | 221 | // Shared scene modules |
222 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 222 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
381 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 381 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
382 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 382 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
383 | // IsAdministrator if no permissions module is present is true. | 383 | // IsAdministrator if no permissions module is present is true. |
384 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); | 384 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB }); |
385 | 385 | ||
386 | // Shared scene modules | 386 | // Shared scene modules |
387 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | 387 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
@@ -507,4 +507,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
507 | // TestHelpers.DisableLogging(); | 507 | // TestHelpers.DisableLogging(); |
508 | } | 508 | } |
509 | } | 509 | } |
510 | } \ No newline at end of file | 510 | } |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index e756c70..9e6cc1a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | |||
@@ -635,15 +635,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice | |||
635 | // TODO: EstateSettings don't seem to get propagated... | 635 | // TODO: EstateSettings don't seem to get propagated... |
636 | if (!scene.RegionInfo.EstateSettings.AllowVoice) | 636 | if (!scene.RegionInfo.EstateSettings.AllowVoice) |
637 | { | 637 | { |
638 | m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", | 638 | //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": voice not enabled in estate settings", |
639 | scene.RegionInfo.RegionName); | 639 | // scene.RegionInfo.RegionName); |
640 | channel_uri = String.Empty; | 640 | channel_uri = String.Empty; |
641 | } | 641 | } |
642 | 642 | ||
643 | if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) | 643 | if ((land.Flags & (uint)ParcelFlags.AllowVoiceChat) == 0) |
644 | { | 644 | { |
645 | m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", | 645 | //m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": voice not enabled for parcel", |
646 | scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); | 646 | // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName); |
647 | channel_uri = String.Empty; | 647 | channel_uri = String.Empty; |
648 | } | 648 | } |
649 | else | 649 | else |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index 0c9fdb9..5d10e93 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -203,8 +203,9 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
203 | { | 203 | { |
204 | } | 204 | } |
205 | 205 | ||
206 | public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn) | 206 | public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount, UUID txn, out string result) |
207 | { | 207 | { |
208 | result = String.Empty; | ||
208 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); | 209 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); |
209 | 210 | ||
210 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); | 211 | bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description); |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs index 7c662c9..40ed3fd 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs | |||
@@ -105,9 +105,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
105 | return m_rootScene.Permissions.CanEditObject(objectid, editorid); | 105 | return m_rootScene.Permissions.CanEditObject(objectid, editorid); |
106 | } | 106 | } |
107 | 107 | ||
108 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene) | 108 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers g, Scene scene, bool allowManager) |
109 | { | 109 | { |
110 | return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g); | 110 | return m_rootScene.Permissions.CanEditParcelProperties(user, parcel, g, allowManager); |
111 | } | 111 | } |
112 | 112 | ||
113 | public bool CanInstantMessage(UUID user, UUID target, Scene startscene) | 113 | public bool CanInstantMessage(UUID user, UUID target, Scene startscene) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5ea14c7..3f0af6d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3109,8 +3109,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3109 | return; | 3109 | return; |
3110 | } | 3110 | } |
3111 | 3111 | ||
3112 | string reason; | ||
3112 | money.ObjectGiveMoney( | 3113 | money.ObjectGiveMoney( |
3113 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero); | 3114 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount,UUID.Zero, out reason); |
3114 | }); | 3115 | }); |
3115 | 3116 | ||
3116 | return 0; | 3117 | return 0; |
@@ -7105,7 +7106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7105 | UUID key; | 7106 | UUID key; |
7106 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 7107 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
7107 | 7108 | ||
7108 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 7109 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
7109 | { | 7110 | { |
7110 | int expires = 0; | 7111 | int expires = 0; |
7111 | if (hours != 0) | 7112 | if (hours != 0) |
@@ -10430,7 +10431,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10430 | // according to the docs, this command only works if script owner and land owner are the same | 10431 | // according to the docs, this command only works if script owner and land owner are the same |
10431 | // lets add estate owners and gods, too, and use the generic permission check. | 10432 | // lets add estate owners and gods, too, and use the generic permission check. |
10432 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10433 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10433 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia)) return; | 10434 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, landObject, GroupPowers.ChangeMedia, false)) return; |
10434 | 10435 | ||
10435 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? | 10436 | bool update = false; // send a ParcelMediaUpdate (and possibly change the land's media URL)? |
10436 | byte loop = 0; | 10437 | byte loop = 0; |
@@ -10873,7 +10874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10873 | m_host.AddScriptLPS(1); | 10874 | m_host.AddScriptLPS(1); |
10874 | UUID key; | 10875 | UUID key; |
10875 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10876 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10876 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 10877 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
10877 | { | 10878 | { |
10878 | int expires = 0; | 10879 | int expires = 0; |
10879 | if (hours != 0) | 10880 | if (hours != 0) |
@@ -10914,7 +10915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10914 | m_host.AddScriptLPS(1); | 10915 | m_host.AddScriptLPS(1); |
10915 | UUID key; | 10916 | UUID key; |
10916 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10917 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10917 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed)) | 10918 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageAllowed, false)) |
10918 | { | 10919 | { |
10919 | if (UUID.TryParse(avatar, out key)) | 10920 | if (UUID.TryParse(avatar, out key)) |
10920 | { | 10921 | { |
@@ -10941,7 +10942,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10941 | m_host.AddScriptLPS(1); | 10942 | m_host.AddScriptLPS(1); |
10942 | UUID key; | 10943 | UUID key; |
10943 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10944 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10944 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned)) | 10945 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
10945 | { | 10946 | { |
10946 | if (UUID.TryParse(avatar, out key)) | 10947 | if (UUID.TryParse(avatar, out key)) |
10947 | { | 10948 | { |
@@ -12784,8 +12785,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12784 | return; | 12785 | return; |
12785 | } | 12786 | } |
12786 | 12787 | ||
12788 | string reason; | ||
12787 | bool result = money.ObjectGiveMoney( | 12789 | bool result = money.ObjectGiveMoney( |
12788 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn); | 12790 | m_host.ParentGroup.RootPart.UUID, m_host.ParentGroup.RootPart.OwnerID, toID, amount, txn, out reason); |
12789 | 12791 | ||
12790 | if (result) | 12792 | if (result) |
12791 | { | 12793 | { |
@@ -12793,7 +12795,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12793 | return; | 12795 | return; |
12794 | } | 12796 | } |
12795 | 12797 | ||
12796 | replydata = "LINDENDOLLAR_INSUFFICIENTFUNDS"; | 12798 | replydata = reason; |
12797 | } | 12799 | } |
12798 | finally | 12800 | finally |
12799 | { | 12801 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index f4e4f44..9c148d1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1434,7 +1434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1434 | return; | 1434 | return; |
1435 | } | 1435 | } |
1436 | 1436 | ||
1437 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions)) | 1437 | if (!World.Permissions.CanEditParcelProperties(m_host.OwnerID, startLandObject, GroupPowers.LandOptions, false)) |
1438 | { | 1438 | { |
1439 | OSSLShoutError("You do not have permission to modify the parcel"); | 1439 | OSSLShoutError("You do not have permission to modify the parcel"); |
1440 | return; | 1440 | return; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index 26850c4..a2ac9c5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -231,6 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
231 | ItemID = ScriptTask.ItemID; | 231 | ItemID = ScriptTask.ItemID; |
232 | AssetID = ScriptTask.AssetID; | 232 | AssetID = ScriptTask.AssetID; |
233 | } | 233 | } |
234 | LocalID = part.LocalId; | ||
234 | 235 | ||
235 | PrimName = part.ParentGroup.Name; | 236 | PrimName = part.ParentGroup.Name; |
236 | StartParam = startParam; | 237 | StartParam = startParam; |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 17243ab..04a4e53 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -1316,13 +1316,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1316 | 1316 | ||
1317 | ScriptInstance instance = null; | 1317 | ScriptInstance instance = null; |
1318 | // Create the object record | 1318 | // Create the object record |
1319 | UUID appDomain = assetID; | ||
1320 | |||
1321 | |||
1322 | |||
1319 | lockScriptsForRead(true); | 1323 | lockScriptsForRead(true); |
1320 | if ((!m_Scripts.ContainsKey(itemID)) || | 1324 | if ((!m_Scripts.ContainsKey(itemID)) || |
1321 | (m_Scripts[itemID].AssetID != assetID)) | 1325 | (m_Scripts[itemID].AssetID != assetID)) |
1322 | { | 1326 | { |
1323 | lockScriptsForRead(false); | 1327 | lockScriptsForRead(false); |
1324 | 1328 | instance = new ScriptInstance(this, part, | |
1325 | UUID appDomain = assetID; | 1329 | item, |
1330 | startParam, postOnRez, | ||
1331 | m_MaxScriptQueue); | ||
1332 | |||
1333 | |||
1326 | 1334 | ||
1327 | if (part.ParentGroup.IsAttachment) | 1335 | if (part.ParentGroup.IsAttachment) |
1328 | appDomain = part.ParentGroup.RootPart.UUID; | 1336 | appDomain = part.ParentGroup.RootPart.UUID; |
@@ -1345,9 +1353,39 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1345 | sandbox = AppDomain.CreateDomain( | 1353 | sandbox = AppDomain.CreateDomain( |
1346 | m_Scene.RegionInfo.RegionID.ToString(), | 1354 | m_Scene.RegionInfo.RegionID.ToString(), |
1347 | evidence, appSetup); | 1355 | evidence, appSetup); |
1348 | m_AppDomains[appDomain].AssemblyResolve += | 1356 | if (m_AppDomains.ContainsKey(appDomain)) |
1349 | new ResolveEventHandler( | 1357 | { |
1350 | AssemblyResolver.OnAssemblyResolve); | 1358 | m_AppDomains[appDomain].AssemblyResolve += |
1359 | new ResolveEventHandler( | ||
1360 | AssemblyResolver.OnAssemblyResolve); | ||
1361 | if (m_DomainScripts.ContainsKey(appDomain)) | ||
1362 | { | ||
1363 | m_DomainScripts[appDomain].Add(itemID); | ||
1364 | } | ||
1365 | else | ||
1366 | { | ||
1367 | m_DomainScripts.Add(appDomain, new List<UUID>()); | ||
1368 | m_DomainScripts[appDomain].Add(itemID); | ||
1369 | } | ||
1370 | } | ||
1371 | else | ||
1372 | { | ||
1373 | m_AppDomains.Add(appDomain, sandbox); | ||
1374 | m_AppDomains[appDomain].AssemblyResolve += | ||
1375 | new ResolveEventHandler( | ||
1376 | AssemblyResolver.OnAssemblyResolve); | ||
1377 | if (m_DomainScripts.ContainsKey(appDomain)) | ||
1378 | { | ||
1379 | m_DomainScripts[appDomain].Add(itemID); | ||
1380 | } | ||
1381 | else | ||
1382 | { | ||
1383 | m_DomainScripts.Add(appDomain, new List<UUID>()); | ||
1384 | m_DomainScripts[appDomain].Add(itemID); | ||
1385 | } | ||
1386 | |||
1387 | } | ||
1388 | |||
1351 | } | 1389 | } |
1352 | else | 1390 | else |
1353 | { | 1391 | { |
@@ -1373,12 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1373 | return false; | 1411 | return false; |
1374 | } | 1412 | } |
1375 | } | 1413 | } |
1376 | m_DomainScripts[appDomain].Add(itemID); | 1414 | |
1377 | |||
1378 | instance = new ScriptInstance(this, part, | ||
1379 | item, | ||
1380 | startParam, postOnRez, | ||
1381 | m_MaxScriptQueue); | ||
1382 | 1415 | ||
1383 | instance.Load(m_AppDomains[appDomain], assembly, stateSource); | 1416 | instance.Load(m_AppDomains[appDomain], assembly, stateSource); |
1384 | // m_log.DebugFormat( | 1417 | // m_log.DebugFormat( |
@@ -1502,6 +1535,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1502 | if (handlerObjectRemoved != null) | 1535 | if (handlerObjectRemoved != null) |
1503 | { | 1536 | { |
1504 | SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); | 1537 | SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); |
1538 | if (part != null) | ||
1505 | handlerObjectRemoved(part.UUID); | 1539 | handlerObjectRemoved(part.UUID); |
1506 | } | 1540 | } |
1507 | 1541 | ||