From 9622e8ac72d29b75b96d2dd481671b57d0a204bf Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 23 Apr 2012 19:20:46 +0300 Subject: If a Grid God teleports then include the Godlike teleport flag. This can affect the starting position in the destination region. --- OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index e1fedf4..535d87a 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs @@ -67,6 +67,7 @@ namespace OpenSim.Region.Framework.Scenes public delegate bool RunConsoleCommandHandler(UUID user, Scene requestFromScene); public delegate bool IssueEstateCommandHandler(UUID user, Scene requestFromScene, bool ownerCommand); public delegate bool IsGodHandler(UUID user, Scene requestFromScene); + public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); public delegate bool IsAdministratorHandler(UUID user); public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene); @@ -134,6 +135,7 @@ namespace OpenSim.Region.Framework.Scenes public event RunConsoleCommandHandler OnRunConsoleCommand; public event IssueEstateCommandHandler OnIssueEstateCommand; public event IsGodHandler OnIsGod; + public event IsGridGodHandler OnIsGridGod; public event IsAdministratorHandler OnIsAdministrator; // public event EditParcelHandler OnEditParcel; public event EditParcelPropertiesHandler OnEditParcelProperties; @@ -728,6 +730,21 @@ namespace OpenSim.Region.Framework.Scenes return true; } + public bool IsGridGod(UUID user) + { + IsGridGodHandler handler = OnIsGridGod; + if (handler != null) + { + Delegate[] list = handler.GetInvocationList(); + foreach (IsGridGodHandler h in list) + { + if (h(user, m_scene) == false) + return false; + } + } + return true; + } + public bool IsAdministrator(UUID user) { IsAdministratorHandler handler = OnIsAdministrator; -- cgit v1.1