diff options
author | UbitUmarov | 2016-11-27 15:14:34 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-27 15:14:34 +0000 |
commit | 877d3092b45723a2fe8b3a5bbc224cd5d5e55e82 (patch) | |
tree | f11a5b2d85443fefc81e1958c82828a16fc656cc /OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | |
parent | fix pool parameters for httptests (diff) | |
parent | HG on links request build the URI in http format with a / at end, this should... (diff) | |
download | opensim-SC-877d3092b45723a2fe8b3a5bbc224cd5d5e55e82.zip opensim-SC-877d3092b45723a2fe8b3a5bbc224cd5d5e55e82.tar.gz opensim-SC-877d3092b45723a2fe8b3a5bbc224cd5d5e55e82.tar.bz2 opensim-SC-877d3092b45723a2fe8b3a5bbc224cd5d5e55e82.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index c48e585..6c147f4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | |||
@@ -53,15 +53,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
53 | { | 53 | { |
54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 54 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
55 | 55 | ||
56 | private const int DEBUG_CHANNEL = 2147483647; | 56 | // private const int DEBUG_CHANNEL = 2147483647; use base value |
57 | 57 | ||
58 | private List<IScene> m_scenes = new List<IScene>(); | 58 | private new List<IScene> m_scenes = new List<IScene>(); |
59 | private List<IScene> m_conciergedScenes = new List<IScene>(); | 59 | private List<IScene> m_conciergedScenes = new List<IScene>(); |
60 | 60 | ||
61 | private bool m_replacingChatModule = false; | 61 | private bool m_replacingChatModule = false; |
62 | 62 | ||
63 | private IConfig m_config; | ||
64 | |||
65 | private string m_whoami = "conferencier"; | 63 | private string m_whoami = "conferencier"; |
66 | private Regex m_regions = null; | 64 | private Regex m_regions = null; |
67 | private string m_welcomes = null; | 65 | private string m_welcomes = null; |
@@ -72,29 +70,28 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
72 | private string m_brokerURI = String.Empty; | 70 | private string m_brokerURI = String.Empty; |
73 | private int m_brokerUpdateTimeout = 300; | 71 | private int m_brokerUpdateTimeout = 300; |
74 | 72 | ||
75 | internal object m_syncy = new object(); | 73 | internal new object m_syncy = new object(); |
76 | 74 | ||
77 | internal bool m_enabled = false; | 75 | internal new bool m_enabled = false; |
78 | 76 | ||
79 | #region ISharedRegionModule Members | 77 | #region ISharedRegionModule Members |
80 | public override void Initialise(IConfigSource config) | 78 | public override void Initialise(IConfigSource configSource) |
81 | { | 79 | { |
82 | m_config = config.Configs["Concierge"]; | 80 | IConfig config = configSource.Configs["Concierge"]; |
83 | 81 | ||
84 | if (null == m_config) | 82 | if (config == null) |
85 | return; | 83 | return; |
86 | 84 | ||
87 | if (!m_config.GetBoolean("enabled", false)) | 85 | if (!config.GetBoolean("enabled", false)) |
88 | return; | 86 | return; |
89 | 87 | ||
90 | m_enabled = true; | 88 | m_enabled = true; |
91 | 89 | ||
92 | |||
93 | // check whether ChatModule has been disabled: if yes, | 90 | // check whether ChatModule has been disabled: if yes, |
94 | // then we'll "stand in" | 91 | // then we'll "stand in" |
95 | try | 92 | try |
96 | { | 93 | { |
97 | if (config.Configs["Chat"] == null) | 94 | if (configSource.Configs["Chat"] == null) |
98 | { | 95 | { |
99 | // if Chat module has not been configured it's | 96 | // if Chat module has not been configured it's |
100 | // enabled by default, so we are not going to | 97 | // enabled by default, so we are not going to |
@@ -103,7 +100,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
103 | } | 100 | } |
104 | else | 101 | else |
105 | { | 102 | { |
106 | m_replacingChatModule = !config.Configs["Chat"].GetBoolean("enabled", true); | 103 | m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); |
107 | } | 104 | } |
108 | } | 105 | } |
109 | catch (Exception) | 106 | catch (Exception) |
@@ -114,21 +111,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
114 | m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); | 111 | m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); |
115 | 112 | ||
116 | // take note of concierge channel and of identity | 113 | // take note of concierge channel and of identity |
117 | m_conciergeChannel = config.Configs["Concierge"].GetInt("concierge_channel", m_conciergeChannel); | 114 | m_conciergeChannel = configSource.Configs["Concierge"].GetInt("concierge_channel", m_conciergeChannel); |
118 | m_whoami = m_config.GetString("whoami", "conferencier"); | 115 | m_whoami = config.GetString("whoami", "conferencier"); |
119 | m_welcomes = m_config.GetString("welcomes", m_welcomes); | 116 | m_welcomes = config.GetString("welcomes", m_welcomes); |
120 | m_announceEntering = m_config.GetString("announce_entering", m_announceEntering); | 117 | m_announceEntering = config.GetString("announce_entering", m_announceEntering); |
121 | m_announceLeaving = m_config.GetString("announce_leaving", m_announceLeaving); | 118 | m_announceLeaving = config.GetString("announce_leaving", m_announceLeaving); |
122 | m_xmlRpcPassword = m_config.GetString("password", m_xmlRpcPassword); | 119 | m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); |
123 | m_brokerURI = m_config.GetString("broker", m_brokerURI); | 120 | m_brokerURI = config.GetString("broker", m_brokerURI); |
124 | m_brokerUpdateTimeout = m_config.GetInt("broker_timeout", m_brokerUpdateTimeout); | 121 | m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); |
125 | 122 | ||
126 | m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami); | 123 | m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami); |
127 | 124 | ||
128 | // calculate regions Regex | 125 | // calculate regions Regex |
129 | if (m_regions == null) | 126 | if (m_regions == null) |
130 | { | 127 | { |
131 | string regions = m_config.GetString("regions", String.Empty); | 128 | string regions = config.GetString("regions", String.Empty); |
132 | if (!String.IsNullOrEmpty(regions)) | 129 | if (!String.IsNullOrEmpty(regions)) |
133 | { | 130 | { |
134 | m_regions = new Regex(@regions, RegexOptions.Compiled | RegexOptions.IgnoreCase); | 131 | m_regions = new Regex(@regions, RegexOptions.Compiled | RegexOptions.IgnoreCase); |
@@ -136,7 +133,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
136 | } | 133 | } |
137 | } | 134 | } |
138 | 135 | ||
139 | |||
140 | public override void AddRegion(Scene scene) | 136 | public override void AddRegion(Scene scene) |
141 | { | 137 | { |
142 | if (!m_enabled) return; | 138 | if (!m_enabled) return; |