diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateModule.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs index 8eb38c2..fb4d04f 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs | |||
@@ -52,6 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
52 | protected List<Scene> m_Scenes = new List<Scene>(); | 52 | protected List<Scene> m_Scenes = new List<Scene>(); |
53 | protected bool m_InInfoUpdate = false; | 53 | protected bool m_InInfoUpdate = false; |
54 | private string token = "7db8eh2gvgg45jj"; | 54 | private string token = "7db8eh2gvgg45jj"; |
55 | protected bool m_enabled = false; | ||
55 | 56 | ||
56 | public bool InInfoUpdate | 57 | public bool InInfoUpdate |
57 | { | 58 | { |
@@ -73,10 +74,19 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
73 | IConfig estateConfig = config.Configs["Estates"]; | 74 | IConfig estateConfig = config.Configs["Estates"]; |
74 | if (estateConfig != null) | 75 | if (estateConfig != null) |
75 | { | 76 | { |
77 | if (estateConfig.GetString("EstateCommunicationsHandler", Name) == Name) | ||
78 | m_enabled = true; | ||
79 | else | ||
80 | return; | ||
81 | |||
76 | port = (uint)estateConfig.GetInt("Port", 0); | 82 | port = (uint)estateConfig.GetInt("Port", 0); |
77 | // this will need to came from somewhere else | 83 | // this will need to came from somewhere else |
78 | token = estateConfig.GetString("Token", token); | 84 | token = estateConfig.GetString("Token", token); |
79 | } | 85 | } |
86 | else | ||
87 | { | ||
88 | m_enabled = true; | ||
89 | } | ||
80 | 90 | ||
81 | m_EstateConnector = new EstateConnector(this, token, port); | 91 | m_EstateConnector = new EstateConnector(this, token, port); |
82 | 92 | ||
@@ -98,12 +108,18 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
98 | 108 | ||
99 | public void AddRegion(Scene scene) | 109 | public void AddRegion(Scene scene) |
100 | { | 110 | { |
111 | if (!m_enabled) | ||
112 | return; | ||
113 | |||
101 | lock (m_Scenes) | 114 | lock (m_Scenes) |
102 | m_Scenes.Add(scene); | 115 | m_Scenes.Add(scene); |
103 | } | 116 | } |
104 | 117 | ||
105 | public void RegionLoaded(Scene scene) | 118 | public void RegionLoaded(Scene scene) |
106 | { | 119 | { |
120 | if (!m_enabled) | ||
121 | return; | ||
122 | |||
107 | IEstateModule em = scene.RequestModuleInterface<IEstateModule>(); | 123 | IEstateModule em = scene.RequestModuleInterface<IEstateModule>(); |
108 | 124 | ||
109 | em.OnRegionInfoChange += OnRegionInfoChange; | 125 | em.OnRegionInfoChange += OnRegionInfoChange; |
@@ -115,6 +131,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
115 | 131 | ||
116 | public void RemoveRegion(Scene scene) | 132 | public void RemoveRegion(Scene scene) |
117 | { | 133 | { |
134 | if (!m_enabled) | ||
135 | return; | ||
136 | |||
118 | lock (m_Scenes) | 137 | lock (m_Scenes) |
119 | m_Scenes.Remove(scene); | 138 | m_Scenes.Remove(scene); |
120 | } | 139 | } |