mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
This commit is contained in:
@@ -39,6 +39,9 @@ using OpenSim.Framework.Serialization.External;
|
||||
using OpenSim.Region.CoreModules.World.Archiver;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using Ionic.Zlib;
|
||||
using GZipStream = Ionic.Zlib.GZipStream;
|
||||
using CompressionMode = Ionic.Zlib.CompressionMode;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
{
|
||||
@@ -99,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||
scene,
|
||||
userInfo,
|
||||
invPath,
|
||||
new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress))
|
||||
new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress, CompressionLevel.BestCompression))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
public void Teleport(ScenePresence sp, ulong regionHandle, Vector3 position, Vector3 lookAt, uint teleportFlags)
|
||||
{
|
||||
if (sp.Scene.Permissions.IsGridGod(sp.UUID))
|
||||
{
|
||||
// This user will be a God in the destination scene, too
|
||||
teleportFlags |= (uint)TeleportFlags.Godlike;
|
||||
}
|
||||
|
||||
if (!sp.Scene.Permissions.CanTeleport(sp.UUID))
|
||||
return;
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (sp.UserLevel < m_levelHGTeleport)
|
||||
{
|
||||
m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: Unable to HG teleport agent due to insufficient UserLevel.");
|
||||
reason = "HyperGrid teleport not permitted";
|
||||
reason = "Hypergrid teleport not allowed";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -149,9 +149,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
lock (m_scenes)
|
||||
m_scenes[scene.RegionInfo.RegionID] = scene;
|
||||
|
||||
scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded);
|
||||
scene.EventManager.OnLoginsEnabled += OnLoginsEnabled;
|
||||
}
|
||||
|
||||
|
||||
///<summary>
|
||||
///
|
||||
///</summary>
|
||||
@@ -166,9 +167,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
|
||||
|
||||
#endregion ISharedRegionModule
|
||||
|
||||
void EventManager_OnPrimsLoaded(Scene s)
|
||||
void OnLoginsEnabled(string regionName)
|
||||
{
|
||||
UploadMapTile(s);
|
||||
Scene scene = null;
|
||||
foreach (Scene s in m_scenes.Values)
|
||||
if (s.RegionInfo.RegionName == regionName)
|
||||
{
|
||||
scene = s;
|
||||
break;
|
||||
}
|
||||
if (scene != null)
|
||||
UploadMapTile(scene);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ using OpenSim.Framework.Serialization;
|
||||
using OpenSim.Region.CoreModules.World.Terrain;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Ionic.Zlib;
|
||||
using GZipStream = Ionic.Zlib.GZipStream;
|
||||
using CompressionMode = Ionic.Zlib.CompressionMode;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
@@ -82,7 +85,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
||||
{
|
||||
try
|
||||
{
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress);
|
||||
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress, CompressionLevel.BestCompression);
|
||||
}
|
||||
catch (EntryPointNotFoundException e)
|
||||
{
|
||||
|
||||
@@ -166,6 +166,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
m_scene.Permissions.OnDeedParcel += CanDeedParcel;
|
||||
m_scene.Permissions.OnDeedObject += CanDeedObject;
|
||||
m_scene.Permissions.OnIsGod += IsGod;
|
||||
m_scene.Permissions.OnIsGridGod += IsGridGod;
|
||||
m_scene.Permissions.OnIsAdministrator += IsAdministrator;
|
||||
m_scene.Permissions.OnDuplicateObject += CanDuplicateObject;
|
||||
m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED
|
||||
@@ -466,22 +467,34 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
if (IsEstateManager(user) && m_RegionManagerIsGod)
|
||||
return true;
|
||||
|
||||
if (IsGridGod(user, null))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Is the given user a God throughout the grid (not just in the current scene)?
|
||||
/// </summary>
|
||||
/// <param name="user">The user</param>
|
||||
/// <param name="scene">Unused, can be null</param>
|
||||
/// <returns></returns>
|
||||
protected bool IsGridGod(UUID user, Scene scene)
|
||||
{
|
||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||
|
||||
if (user == UUID.Zero) return false;
|
||||
|
||||
if (m_allowGridGods)
|
||||
{
|
||||
ScenePresence sp = m_scene.GetScenePresence(user);
|
||||
if (sp != null)
|
||||
{
|
||||
if (sp.UserLevel >= 200)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
return (sp.UserLevel >= 200);
|
||||
|
||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, user);
|
||||
if (account != null)
|
||||
{
|
||||
if (account.UserLevel >= 200)
|
||||
return true;
|
||||
}
|
||||
return (account.UserLevel >= 200);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user