aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-24 01:38:36 +0000
committerTeravus Ovares2007-11-24 01:38:36 +0000
commit52714c339e49e8f1f839b315cd6b4da1bb53e82a (patch)
tree73a7994d316638607dfcb79a64a7d4f13db4a875 /OpenSim/Region/Environment/Scenes/Scene.cs
parent*Shared Modules have feelings too! -- Shared Region Modules that are found in... (diff)
downloadopensim-SC_OLD-52714c339e49e8f1f839b315cd6b4da1bb53e82a.zip
opensim-SC_OLD-52714c339e49e8f1f839b315cd6b4da1bb53e82a.tar.gz
opensim-SC_OLD-52714c339e49e8f1f839b315cd6b4da1bb53e82a.tar.bz2
opensim-SC_OLD-52714c339e49e8f1f839b315cd6b4da1bb53e82a.tar.xz
* 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....
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs32
1 files changed, 32 insertions, 0 deletions
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
830 new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest); 830 new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest);
831 831
832 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage); 832 client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
833 client.OnRequestGodlikePowers += handleRequestGodlikePowers;
833 834
834 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 835 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
835 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCache.HandleCreateInventoryFolder; 836 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCache.HandleCreateInventoryFolder;
@@ -1177,6 +1178,37 @@ namespace OpenSim.Region.Environment.Scenes
1177 } 1178 }
1178 } 1179 }
1179 1180
1181 public void handleRequestGodlikePowers(LLUUID agentID, LLUUID sessionID, LLUUID token, IClientAPI controllingclient)
1182 {
1183 // First check that this is the sim owner
1184
1185 if (agentID == RegionInfo.MasterAvatarAssignedUUID)
1186 {
1187
1188 // User needs to be logged into this sim
1189 if (m_scenePresences.ContainsKey(agentID))
1190 {
1191 // Next we check for spoofing.....
1192 LLUUID testSessionID = m_scenePresences[agentID].ControllingClient.SessionId;
1193 if (sessionID == testSessionID)
1194 {
1195 if (sessionID == controllingclient.SessionId)
1196 {
1197 m_scenePresences[agentID].GrantGodlikePowers(agentID, testSessionID, token);
1198
1199 }
1200
1201 }
1202
1203 }
1204 }
1205 else
1206 {
1207 m_scenePresences[agentID].ControllingClient.SendAgentAlertMessage("Request for god powers denied", false);
1208 }
1209
1210 }
1211
1180 public void SendAlertToUser(string firstName, string lastName, string message, bool modal) 1212 public void SendAlertToUser(string firstName, string lastName, string message, bool modal)
1181 { 1213 {
1182 foreach (ScenePresence presence in m_scenePresences.Values) 1214 foreach (ScenePresence presence in m_scenePresences.Values)