diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/EstateManager.cs | 32 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 91 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneBase.cs | 5 |
3 files changed, 103 insertions, 25 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index 1367cb3..64b9d78 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -198,18 +198,48 @@ namespace OpenSim.Region.Environment | |||
198 | EstateChangeCovenant(packet); | 198 | EstateChangeCovenant(packet); |
199 | } | 199 | } |
200 | break; | 200 | break; |
201 | case "estateaccessdelta": | 201 | case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. |
202 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | 202 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) |
203 | { | 203 | { |
204 | estateAccessDelta(remote_client, packet); | 204 | estateAccessDelta(remote_client, packet); |
205 | } | 205 | } |
206 | break; | 206 | break; |
207 | case "simulatormessage": | ||
208 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | ||
209 | { | ||
210 | SendSimulatorBlueBoxMessage(remote_client, packet); | ||
211 | } | ||
212 | break; | ||
213 | case "instantmessage": | ||
214 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | ||
215 | { | ||
216 | SendEstateBlueBoxMessage(remote_client, packet); | ||
217 | } | ||
218 | break; | ||
207 | default: | 219 | default: |
208 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 220 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
209 | break; | 221 | break; |
210 | } | 222 | } |
211 | } | 223 | } |
212 | 224 | ||
225 | private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet) | ||
226 | { | ||
227 | LLUUID invoice = packet.MethodData.Invoice; | ||
228 | LLUUID SenderID = new LLUUID(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); | ||
229 | string SenderName = Helpers.FieldToUTF8String(packet.ParamList[3].Parameter); | ||
230 | string Message = Helpers.FieldToUTF8String(packet.ParamList[4].Parameter); | ||
231 | m_scene.SendRegionMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message); | ||
232 | |||
233 | } | ||
234 | private void SendEstateBlueBoxMessage(IClientAPI remote_client, EstateOwnerMessagePacket packet) | ||
235 | { | ||
236 | LLUUID invoice = packet.MethodData.Invoice; | ||
237 | LLUUID SenderID = packet.AgentData.AgentID; | ||
238 | string SenderName = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter); | ||
239 | string Message = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter); | ||
240 | m_scene.SendEstateMessageFromEstateTools(SenderID, packet.AgentData.SessionID, SenderName, Message); | ||
241 | |||
242 | } | ||
213 | private void sendDetailedEstateData(IClientAPI remote_client, EstateOwnerMessagePacket packet) | 243 | private void sendDetailedEstateData(IClientAPI remote_client, EstateOwnerMessagePacket packet) |
214 | { | 244 | { |
215 | 245 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8032502..0a8df98 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -389,7 +389,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
389 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 389 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
390 | MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); | 390 | MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); |
391 | m_restartTimer.Start(); | 391 | m_restartTimer.Start(); |
392 | SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 392 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), "", RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
393 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | ||
393 | } | 394 | } |
394 | } | 395 | } |
395 | 396 | ||
@@ -403,8 +404,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
403 | if (m_RestartTimerCounter <= m_incrementsof15seconds) | 404 | if (m_RestartTimerCounter <= m_incrementsof15seconds) |
404 | { | 405 | { |
405 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) | 406 | if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7) |
406 | SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + | 407 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), "", RegionInfo.RegionName + ": Restarting in " + |
407 | " seconds"); | 408 | ((8 - m_RestartTimerCounter) * 15) + " seconds"); |
409 | |||
410 | // SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) + | ||
411 | //" seconds"); | ||
408 | } | 412 | } |
409 | else | 413 | else |
410 | { | 414 | { |
@@ -1813,13 +1817,54 @@ namespace OpenSim.Region.Environment.Scenes | |||
1813 | } | 1817 | } |
1814 | 1818 | ||
1815 | /// <summary> | 1819 | /// <summary> |
1816 | /// | 1820 | /// Sends a Big Blue Box message on the upper right of the screen to the client |
1821 | /// for all agents in the region | ||
1817 | /// </summary> | 1822 | /// </summary> |
1818 | /// <param name="godID"></param> | 1823 | /// <param name="FromAvatarID">The person sending the message</param> |
1819 | /// <param name="sessionID"></param> | 1824 | /// <param name="fromSessionID">The session of the person sending the message</param> |
1820 | /// <param name="agentID"></param> | 1825 | /// <param name="FromAvatarName">The name of the person doing the sending</param> |
1821 | /// <param name="kickflags"></param> | 1826 | /// <param name="Message">The Message being sent to the user</param> |
1822 | /// <param name="reason"></param> | 1827 | public void SendRegionMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) |
1828 | { | ||
1829 | |||
1830 | List<ScenePresence> presenceList = GetScenePresences(); | ||
1831 | |||
1832 | foreach (ScenePresence presence in presenceList) | ||
1833 | { | ||
1834 | if (!presence.IsChildAgent) | ||
1835 | presence.ControllingClient.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); | ||
1836 | } | ||
1837 | } | ||
1838 | |||
1839 | /// <summary> | ||
1840 | /// Sends a Big Blue Box message on the upper right of the screen to the client | ||
1841 | /// for all agents in the estate | ||
1842 | /// </summary> | ||
1843 | /// <param name="FromAvatarID">The person sending the message</param> | ||
1844 | /// <param name="fromSessionID">The session of the person sending the message</param> | ||
1845 | /// <param name="FromAvatarName">The name of the person doing the sending</param> | ||
1846 | /// <param name="Message">The Message being sent to the user</param> | ||
1847 | public void SendEstateMessageFromEstateTools(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) | ||
1848 | { | ||
1849 | |||
1850 | ClientManager.ForEachClient(delegate(IClientAPI controller) | ||
1851 | { | ||
1852 | controller.SendBlueBoxMessage(FromAvatarID, fromSessionID, FromAvatarName, Message); | ||
1853 | } | ||
1854 | ); | ||
1855 | } | ||
1856 | |||
1857 | /// <summary> | ||
1858 | /// Kicks User specified from the simulator. This logs them off of the grid | ||
1859 | /// If the client gets the UUID: 44e87126e7944ded05b37c42da3d5cdb it assumes | ||
1860 | /// that you're kicking it even if the avatar's UUID isn't the UUID that the | ||
1861 | /// agent is assigned | ||
1862 | /// </summary> | ||
1863 | /// <param name="godID">The person doing the kicking</param> | ||
1864 | /// <param name="sessionID">The session of the person doing the kicking</param> | ||
1865 | /// <param name="agentID">the person that is being kicked</param> | ||
1866 | /// <param name="kickflags">This isn't used apparently</param> | ||
1867 | /// <param name="reason">The message to send to the user after it's been turned into a field</param> | ||
1823 | public void handleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) | 1868 | public void handleGodlikeKickUser(LLUUID godID, LLUUID sessionID, LLUUID agentID, uint kickflags, byte[] reason) |
1824 | { | 1869 | { |
1825 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. | 1870 | // For some reason the client sends this seemingly hard coded UUID for kicking everyone. Dun-know. |
@@ -1832,22 +1877,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1832 | { | 1877 | { |
1833 | ClientManager.ForEachClient(delegate(IClientAPI controller) | 1878 | ClientManager.ForEachClient(delegate(IClientAPI controller) |
1834 | { | 1879 | { |
1835 | ScenePresence p = GetScenePresence(controller.AgentId); | 1880 | if (controller.AgentId != godID) |
1836 | bool childagent = !p.Equals(null) && p.IsChildAgent; | ||
1837 | if (controller.AgentId != godID && !childagent) | ||
1838 | // Do we really want to kick the initiator of this madness? | ||
1839 | { | ||
1840 | controller.Kick(Helpers.FieldToUTF8String(reason)); | 1881 | controller.Kick(Helpers.FieldToUTF8String(reason)); |
1841 | 1882 | ||
1842 | if (childagent) | 1883 | |
1843 | { | 1884 | |
1844 | m_innerScene.removeUserCount(false); | ||
1845 | } | ||
1846 | else | ||
1847 | { | ||
1848 | m_innerScene.removeUserCount(true); | ||
1849 | } | ||
1850 | } | ||
1851 | } | 1885 | } |
1852 | ); | 1886 | ); |
1853 | // This is a bit crude. It seems the client will be null before it actually stops the thread | 1887 | // This is a bit crude. It seems the client will be null before it actually stops the thread |
@@ -2200,6 +2234,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
2200 | } | 2234 | } |
2201 | 2235 | ||
2202 | /// <summary> | 2236 | /// <summary> |
2237 | /// Request an Avatar's Child Status - used by ClientView when a 'kick everyone' or 'estate message' occurs | ||
2238 | /// </summary> | ||
2239 | /// <param name="avatarID">AvatarID to lookup</param> | ||
2240 | /// <returns></returns> | ||
2241 | public bool PresenceChildStatus(LLUUID avatarID) | ||
2242 | { | ||
2243 | ScenePresence cp = GetScenePresence(avatarID); | ||
2244 | return cp.IsChildAgent; | ||
2245 | } | ||
2246 | |||
2247 | /// <summary> | ||
2203 | /// | 2248 | /// |
2204 | /// </summary> | 2249 | /// </summary> |
2205 | /// <param name="action"></param> | 2250 | /// <param name="action"></param> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index fe8f8da..bf8bedc 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -157,7 +157,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
157 | OnRestart(RegionInfo); | 157 | OnRestart(RegionInfo); |
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | public virtual bool PresenceChildStatus(LLUUID avatarID) | |
161 | { | ||
162 | return false; | ||
163 | } | ||
161 | public abstract bool OtherRegionUp(RegionInfo thisRegion); | 164 | public abstract bool OtherRegionUp(RegionInfo thisRegion); |
162 | 165 | ||
163 | #endregion | 166 | #endregion |