From 52714c339e49e8f1f839b315cd6b4da1bb53e82a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 24 Nov 2007 01:38:36 +0000 Subject: * Hanling RequestGodlikePowers. On Request.. sends the sim owner's client the appropriate messages to make it think it's got god status. Will be used for finding more unimplemented packets.... --- OpenSim/Region/Environment/Scenes/Scene.cs | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7bcd7bd..234b12a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -830,6 +830,7 @@ namespace OpenSim.Region.Environment.Scenes new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); + client.OnRequestGodlikePowers += handleRequestGodlikePowers; client.OnCreateNewInventoryItem += CreateNewInventoryItem; client.OnCreateNewInventoryFolder += CommsManager.UserProfileCache.HandleCreateInventoryFolder; @@ -1177,6 +1178,37 @@ namespace OpenSim.Region.Environment.Scenes } } + public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, IClientAPI controllingclient) + { + // First check that this is the sim owner + + if (agentID == RegionInfo.MasterAvatarAssignedUUID) + { + + // User needs to be logged into this sim + if (m_scenePresences.ContainsKey(agentID)) + { + // Next we check for spoofing..... + LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId; + if (sessionID == testSessionID) + { + if (sessionID == controllingclient.SessionId) + { + m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token); + + } + + } + + } + } + else + { + m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false); + } + + } + public void SendAlertToUser(string firstName, string lastName, string message, bool modal) { foreach (ScenePresence presence in m_scenePresences.Values) -- cgit v1.1