diff options
*Moved LandManagement into its own region module (spiffy!)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs new file mode 100644 index 0000000..ac8c1a8 --- /dev/null +++ b/OpenSim/Region/Environment/Modules/LandManagement/LandManagementModule.cs | |||
@@ -0,0 +1,62 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using libsecondlife; | ||
4 | using libsecondlife.Packets; | ||
5 | using OpenSim.Framework; | ||
6 | using OpenSim.Framework.Console; | ||
7 | using OpenSim.Region.Environment.Scenes; | ||
8 | using OpenSim.Region.Environment.Interfaces; | ||
9 | using Nini.Config; | ||
10 | |||
11 | namespace OpenSim.Region.Environment.Modules.LandManagement | ||
12 | { | ||
13 | public class LandManagementModule : IRegionModule | ||
14 | { | ||
15 | private LandChannel landChannel; | ||
16 | private Scene m_scene; | ||
17 | |||
18 | #region IRegionModule Members | ||
19 | |||
20 | public void Initialise(Scene scene, IConfigSource source) | ||
21 | { | ||
22 | m_scene = scene; | ||
23 | landChannel = new LandChannel(scene); | ||
24 | |||
25 | m_scene.EventManager.OnParcelPrimCountAdd += landChannel.addPrimToLandPrimCounts; | ||
26 | m_scene.EventManager.OnParcelPrimCountUpdate += landChannel.updateLandPrimCounts; | ||
27 | m_scene.EventManager.OnAvatarEnteringNewParcel += new EventManager.AvatarEnteringNewParcel(landChannel.handleAvatarChangingParcel); | ||
28 | m_scene.EventManager.OnClientMovement += new EventManager.ClientMovement(landChannel.handleAnyClientMovement); | ||
29 | |||
30 | lock (m_scene) | ||
31 | { | ||
32 | m_scene.LandChannel = (ILandChannel)landChannel; | ||
33 | } | ||
34 | } | ||
35 | |||
36 | public void PostInitialise() | ||
37 | { | ||
38 | |||
39 | } | ||
40 | |||
41 | public void Close() | ||
42 | { | ||
43 | |||
44 | } | ||
45 | |||
46 | public string Name | ||
47 | { | ||
48 | get { return "LandManagementModule"; } | ||
49 | } | ||
50 | |||
51 | public bool IsSharedModule | ||
52 | { | ||
53 | get { return false; } | ||
54 | } | ||
55 | |||
56 | |||
57 | |||
58 | |||
59 | |||
60 | #endregion | ||
61 | } | ||
62 | } | ||