From 0f1fc7999417a2e1188de26d4ac9c881ea7bb684 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Nov 2010 20:14:58 +0100 Subject: Implement god summons --- .../Region/CoreModules/Avatar/Lure/LureModule.cs | 28 ++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index d1d7df2..a09e72b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs @@ -150,12 +150,25 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure m_log.DebugFormat("TP invite with message {0}", message); - GridInstantMessage m = new GridInstantMessage(scene, client.AgentId, - client.FirstName+" "+client.LastName, targetid, - (byte)InstantMessageDialog.RequestTeleport, false, - message, dest, false, presence.AbsolutePosition, - new Byte[0]); - + GridInstantMessage m; + + if (scene.Permissions.IsAdministrator(client.AgentId) && presence.GodLevel >= 200 && (scene.Permissions.IsAdministrator(targetid))) + { + m = new GridInstantMessage(scene, client.AgentId, + client.FirstName+" "+client.LastName, targetid, + (byte)InstantMessageDialog.GodLikeRequestTeleport, false, + message, dest, false, presence.AbsolutePosition, + new Byte[0]); + } + else + { + m = new GridInstantMessage(scene, client.AgentId, + client.FirstName+" "+client.LastName, targetid, + (byte)InstantMessageDialog.RequestTeleport, false, + message, dest, false, presence.AbsolutePosition, + new Byte[0]); + } + if (m_TransferModule != null) { m_TransferModule.SendInstantMessage(m, @@ -190,7 +203,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure { // Forward remote teleport requests // - if (msg.dialog != 22) + if (msg.dialog != (byte)InstantMessageDialog.RequestTeleport && + msg.dialog != (byte)InstantMessageDialog.GodLikeRequestTeleport) return; if (m_TransferModule != null) -- cgit v1.1