diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 80fa08a..3ded00c 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -68,6 +68,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
68 | public event ChangeDelegate OnEstateInfoChange; | 68 | public event ChangeDelegate OnEstateInfoChange; |
69 | public event MessageDelegate OnEstateMessage; | 69 | public event MessageDelegate OnEstateMessage; |
70 | 70 | ||
71 | private int m_delayCount = 0; | ||
72 | |||
71 | #region Region Module interface | 73 | #region Region Module interface |
72 | 74 | ||
73 | public string Name { get { return "EstateManagementModule"; } } | 75 | public string Name { get { return "EstateManagementModule"; } } |
@@ -95,6 +97,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
95 | 97 | ||
96 | m_commands = new EstateManagementCommands(this); | 98 | m_commands = new EstateManagementCommands(this); |
97 | m_commands.Initialise(); | 99 | m_commands.Initialise(); |
100 | |||
101 | m_regionChangeTimer.Interval = 10000; | ||
102 | m_regionChangeTimer.Elapsed += RaiseRegionInfoChange; | ||
103 | m_regionChangeTimer.AutoReset = false; | ||
98 | } | 104 | } |
99 | 105 | ||
100 | public void RemoveRegion(Scene scene) {} | 106 | public void RemoveRegion(Scene scene) {} |
@@ -142,6 +148,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
142 | flags |= RegionFlags.AllowParcelChanges; | 148 | flags |= RegionFlags.AllowParcelChanges; |
143 | if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) | 149 | if (Scene.RegionInfo.RegionSettings.BlockShowInSearch) |
144 | flags |= RegionFlags.BlockParcelSearch; | 150 | flags |= RegionFlags.BlockParcelSearch; |
151 | if (Scene.RegionInfo.RegionSettings.GodBlockSearch) | ||
152 | flags |= (RegionFlags)(1 << 11); | ||
153 | if (Scene.RegionInfo.RegionSettings.Casino) | ||
154 | flags |= (RegionFlags)(1 << 10); | ||
145 | 155 | ||
146 | if (Scene.RegionInfo.RegionSettings.FixedSun) | 156 | if (Scene.RegionInfo.RegionSettings.FixedSun) |
147 | flags |= RegionFlags.SunFixed; | 157 | flags |= RegionFlags.SunFixed; |
@@ -194,6 +204,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
194 | change(Scene.RegionInfo.RegionID); | 204 | change(Scene.RegionInfo.RegionID); |
195 | } | 205 | } |
196 | 206 | ||
207 | protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e) | ||
208 | { | ||
209 | ChangeDelegate change = OnRegionInfoChange; | ||
210 | |||
211 | if (change != null) | ||
212 | change(Scene.RegionInfo.RegionID); | ||
213 | } | ||
214 | |||
197 | public void TriggerRegionInfoChange() | 215 | public void TriggerRegionInfoChange() |
198 | { | 216 | { |
199 | m_regionChangeTimer.Stop(); | 217 | m_regionChangeTimer.Stop(); |
@@ -587,6 +605,16 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
587 | IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>(); | 605 | IRestartModule restartModule = Scene.RequestModuleInterface<IRestartModule>(); |
588 | if (restartModule != null) | 606 | if (restartModule != null) |
589 | { | 607 | { |
608 | if (timeInSeconds == -1) | ||
609 | { | ||
610 | m_delayCount++; | ||
611 | if (m_delayCount > 3) | ||
612 | return; | ||
613 | |||
614 | restartModule.DelayRestart(3600, "Restart delayed by region manager"); | ||
615 | return; | ||
616 | } | ||
617 | |||
590 | List<int> times = new List<int>(); | 618 | List<int> times = new List<int>(); |
591 | while (timeInSeconds > 0) | 619 | while (timeInSeconds > 0) |
592 | { | 620 | { |
@@ -1477,7 +1505,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1477 | sendRegionHandshake(client); | 1505 | sendRegionHandshake(client); |
1478 | } | 1506 | } |
1479 | 1507 | ||
1480 | private uint GetEstateFlags() | 1508 | |
1509 | public uint GetEstateFlags() | ||
1481 | { | 1510 | { |
1482 | RegionFlags flags = RegionFlags.None; | 1511 | RegionFlags flags = RegionFlags.None; |
1483 | 1512 | ||