diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 32 |
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) |