diff options
author | UbitUmarov | 2017-01-05 18:08:12 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-05 18:08:12 +0000 |
commit | a0c9f8499486749ec711324fb2e5e110716c0d9d (patch) | |
tree | 0bd0ab5a157321ed5cac1ccbe6375a48d2f9fde2 /OpenSim/Region/CoreModules | |
parent | a few changes to Gods ( ie administrators) control (diff) | |
parent | Make the estate communications handler selectable (diff) | |
download | opensim-SC-a0c9f8499486749ec711324fb2e5e110716c0d9d.zip opensim-SC-a0c9f8499486749ec711324fb2e5e110716c0d9d.tar.gz opensim-SC-a0c9f8499486749ec711324fb2e5e110716c0d9d.tar.bz2 opensim-SC-a0c9f8499486749ec711324fb2e5e110716c0d9d.tar.xz |
Merge branch 'master' of opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-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; | |||
45 | namespace OpenSim.Region.CoreModules.World.Estate | 45 | namespace 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; |