aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs91
1 files changed, 68 insertions, 23 deletions
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>