aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs (renamed from OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs)4
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateModule.cs (renamed from OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs)21
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs (renamed from OpenSim/Region/CoreModules/World/Estate/XEstateRequestHandler.cs)4
3 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
index e56bd95..ad561fd 100644
--- a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateConnector.cs
@@ -45,11 +45,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected XEstateModule m_EstateModule; 48 protected EstateModule m_EstateModule;
49 private string token; 49 private string token;
50 uint port = 0; 50 uint port = 0;
51 51
52 public EstateConnector(XEstateModule module, string _token, uint _port) 52 public EstateConnector(EstateModule module, string _token, uint _port)
53 { 53 {
54 m_EstateModule = module; 54 m_EstateModule = module;
55 token = _token; 55 token = _token;
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
index f9438fe..fb4d04f 100644
--- a/OpenSim/Region/CoreModules/World/Estate/XEstateModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateModule.cs
@@ -45,13 +45,14 @@ using Mono.Addins;
45namespace OpenSim.Region.CoreModules.World.Estate 45namespace OpenSim.Region.CoreModules.World.Estate
46{ 46{
47 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XEstate")] 47 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XEstate")]
48 public class XEstateModule : ISharedRegionModule 48 public class EstateModule : ISharedRegionModule
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
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 }
diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateRequestHandler.cs b/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs
index 756b54d..7ab92d1 100644
--- a/OpenSim/Region/CoreModules/World/Estate/XEstateRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs
@@ -46,11 +46,11 @@ namespace OpenSim.Region.CoreModules.World.Estate
46 { 46 {
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 protected XEstateModule m_EstateModule; 49 protected EstateModule m_EstateModule;
50 protected Object m_RequestLock = new Object(); 50 protected Object m_RequestLock = new Object();
51 private string token; 51 private string token;
52 52
53 public EstateRequestHandler(XEstateModule fmodule, string _token) 53 public EstateRequestHandler(EstateModule fmodule, string _token)
54 : base("POST", "/estate") 54 : base("POST", "/estate")
55 { 55 {
56 m_EstateModule = fmodule; 56 m_EstateModule = fmodule;