aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2019-02-01 18:19:27 +0000
committerUbitUmarov2019-02-01 18:19:27 +0000
commit75e48610e7f6c6c60e00b1376b50441d3ea08f52 (patch)
treedf13fa4a496edede4a93065905a6578db58be5ba /OpenSim/Region
parentchange last commit to do as console comand generate map (diff)
downloadopensim-SC-75e48610e7f6c6c60e00b1376b50441d3ea08f52.zip
opensim-SC-75e48610e7f6c6c60e00b1376b50441d3ea08f52.tar.gz
opensim-SC-75e48610e7f6c6c60e00b1376b50441d3ea08f52.tar.bz2
opensim-SC-75e48610e7f6c6c60e00b1376b50441d3ea08f52.tar.xz
place a global cooldown of 2 min on god map generation
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs27
1 files changed, 23 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 72142f2..e35b463 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -9826,6 +9826,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9826 #endregion Parcel related packets 9826 #endregion Parcel related packets
9827 9827
9828 #region Estate Packets 9828 #region Estate Packets
9829 private static double m_lastMapRegenTime = Double.MinValue;
9829 9830
9830 private bool HandleEstateOwnerMessage(IClientAPI sender, Packet Pack) 9831 private bool HandleEstateOwnerMessage(IClientAPI sender, Packet Pack)
9831 { 9832 {
@@ -10108,8 +10109,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10108 } 10109 }
10109 10110
10110 } 10111 }
10111
10112
10113 } 10112 }
10114 return true; 10113 return true;
10115 10114
@@ -10161,8 +10160,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10161 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10160 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10162 { 10161 {
10163 IWorldMapModule mapModule = Scene.RequestModuleInterface<IWorldMapModule>(); 10162 IWorldMapModule mapModule = Scene.RequestModuleInterface<IWorldMapModule>();
10164 if (mapModule != null) 10163 if (mapModule == null)
10165 mapModule.GenerateMaptile(); 10164 {
10165 SendAlertMessage("Terrain map generator not avaiable");
10166 return true;
10167 }
10168 if (m_lastMapRegenTime == Double.MaxValue)
10169 {
10170 SendAlertMessage("Terrain map generation still in progress");
10171 return true;
10172 }
10173
10174 double now = Util.GetTimeStamp();
10175 if (now - m_lastMapRegenTime < 120) // 2 minutes global cool down
10176 {
10177 SendAlertMessage("Please wait at least 2 minutes between map generation comand");
10178 return true;
10179 }
10180
10181 m_lastMapRegenTime = Double.MaxValue;
10182 mapModule.GenerateMaptile();
10183 SendAlertMessage("Terrain map generated");
10184 m_lastMapRegenTime = now;
10166 } 10185 }
10167 return true; 10186 return true;
10168 10187