diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/OptionalModules/Avatar/Concierge | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Concierge')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index 6c147f4..c0de3d9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | |||
@@ -98,7 +98,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
98 | // replace it. | 98 | // replace it. |
99 | m_replacingChatModule = false; | 99 | m_replacingChatModule = false; |
100 | } | 100 | } |
101 | else | 101 | else |
102 | { | 102 | { |
103 | m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); | 103 | m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); |
104 | } | 104 | } |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
107 | { | 107 | { |
108 | m_replacingChatModule = false; | 108 | m_replacingChatModule = false; |
109 | } | 109 | } |
110 | 110 | ||
111 | m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); | 111 | m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); |
112 | 112 | ||
113 | // take note of concierge channel and of identity | 113 | // take note of concierge channel and of identity |
@@ -119,7 +119,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
119 | m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); | 119 | m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); |
120 | m_brokerURI = config.GetString("broker", m_brokerURI); | 120 | m_brokerURI = config.GetString("broker", m_brokerURI); |
121 | m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); | 121 | m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); |
122 | 122 | ||
123 | 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); |
124 | 124 | ||
125 | // calculate regions Regex | 125 | // calculate regions Regex |
@@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
207 | { | 207 | { |
208 | } | 208 | } |
209 | 209 | ||
210 | new public Type ReplaceableInterface | 210 | new public Type ReplaceableInterface |
211 | { | 211 | { |
212 | get { return null; } | 212 | get { return null; } |
213 | } | 213 | } |
@@ -278,7 +278,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
278 | // range of chat to cover the whole | 278 | // range of chat to cover the whole |
279 | // region. however, we don't do this for whisper | 279 | // region. however, we don't do this for whisper |
280 | // (got to have some privacy) | 280 | // (got to have some privacy) |
281 | if (c.Type != ChatTypeEnum.Whisper) | 281 | if (c.Type != ChatTypeEnum.Whisper) |
282 | { | 282 | { |
283 | base.OnChatBroadcast(sender, c); | 283 | base.OnChatBroadcast(sender, c); |
284 | return; | 284 | return; |
@@ -296,17 +296,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
296 | { | 296 | { |
297 | client.OnLogout += OnClientLoggedOut; | 297 | client.OnLogout += OnClientLoggedOut; |
298 | 298 | ||
299 | if (m_replacingChatModule) | 299 | if (m_replacingChatModule) |
300 | client.OnChatFromClient += OnChatFromClient; | 300 | client.OnChatFromClient += OnChatFromClient; |
301 | } | 301 | } |
302 | 302 | ||
303 | 303 | ||
304 | 304 | ||
305 | public void OnClientLoggedOut(IClientAPI client) | 305 | public void OnClientLoggedOut(IClientAPI client) |
306 | { | 306 | { |
307 | client.OnLogout -= OnClientLoggedOut; | 307 | client.OnLogout -= OnClientLoggedOut; |
308 | client.OnConnectionClosed -= OnClientLoggedOut; | 308 | client.OnConnectionClosed -= OnClientLoggedOut; |
309 | 309 | ||
310 | if (m_conciergedScenes.Contains(client.Scene)) | 310 | if (m_conciergedScenes.Contains(client.Scene)) |
311 | { | 311 | { |
312 | Scene scene = client.Scene as Scene; | 312 | Scene scene = client.Scene as Scene; |
@@ -324,7 +324,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
324 | Scene scene = agent.Scene; | 324 | Scene scene = agent.Scene; |
325 | m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName); | 325 | m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName); |
326 | WelcomeAvatar(agent, scene); | 326 | WelcomeAvatar(agent, scene); |
327 | AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, | 327 | AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, |
328 | scene.RegionInfo.RegionName, scene.GetRootAgentCount())); | 328 | scene.RegionInfo.RegionName, scene.GetRootAgentCount())); |
329 | UpdateBroker(scene); | 329 | UpdateBroker(scene); |
330 | } | 330 | } |
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
337 | { | 337 | { |
338 | Scene scene = agent.Scene; | 338 | Scene scene = agent.Scene; |
339 | m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName); | 339 | m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName); |
340 | AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, | 340 | AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, |
341 | scene.RegionInfo.RegionName, scene.GetRootAgentCount())); | 341 | scene.RegionInfo.RegionName, scene.GetRootAgentCount())); |
342 | UpdateBroker(scene); | 342 | UpdateBroker(scene); |
343 | } | 343 | } |
@@ -374,7 +374,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
374 | 374 | ||
375 | scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 375 | scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
376 | { | 376 | { |
377 | list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID)); | 377 | list.Append(String.Format(" <avatar name=\"{0}\" uuid=\"{1}\" />\n", sp.Name, sp.UUID)); |
378 | }); | 378 | }); |
379 | 379 | ||
380 | list.Append("</avatars>"); | 380 | list.Append("</avatars>"); |
@@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
437 | private void UpdateBrokerDone(IAsyncResult result) | 437 | private void UpdateBrokerDone(IAsyncResult result) |
438 | { | 438 | { |
439 | BrokerState bs = null; | 439 | BrokerState bs = null; |
440 | try | 440 | try |
441 | { | 441 | { |
442 | bs = result.AsyncState as BrokerState; | 442 | bs = result.AsyncState as BrokerState; |
443 | HttpWebRequest updatePost = bs.Poster; | 443 | HttpWebRequest updatePost = bs.Poster; |
@@ -450,15 +450,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
450 | catch (WebException we) | 450 | catch (WebException we) |
451 | { | 451 | { |
452 | m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status); | 452 | m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status); |
453 | if (null != we.Response) | 453 | if (null != we.Response) |
454 | { | 454 | { |
455 | using (HttpWebResponse resp = we.Response as HttpWebResponse) | 455 | using (HttpWebResponse resp = we.Response as HttpWebResponse) |
456 | { | 456 | { |
457 | m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode); | 457 | m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode); |
458 | m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription); | 458 | m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription); |
459 | m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server); | 459 | m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server); |
460 | 460 | ||
461 | if (resp.ContentLength > 0) | 461 | if (resp.ContentLength > 0) |
462 | { | 462 | { |
463 | StreamReader content = new StreamReader(resp.GetResponseStream()); | 463 | StreamReader content = new StreamReader(resp.GetResponseStream()); |
464 | m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); | 464 | m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); |
@@ -476,12 +476,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
476 | // welcome file there: if yes, send it to the agent | 476 | // welcome file there: if yes, send it to the agent |
477 | if (!String.IsNullOrEmpty(m_welcomes)) | 477 | if (!String.IsNullOrEmpty(m_welcomes)) |
478 | { | 478 | { |
479 | string[] welcomes = new string[] { | 479 | string[] welcomes = new string[] { |
480 | Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName), | 480 | Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName), |
481 | Path.Combine(m_welcomes, "DEFAULT")}; | 481 | Path.Combine(m_welcomes, "DEFAULT")}; |
482 | foreach (string welcome in welcomes) | 482 | foreach (string welcome in welcomes) |
483 | { | 483 | { |
484 | if (File.Exists(welcome)) | 484 | if (File.Exists(welcome)) |
485 | { | 485 | { |
486 | try | 486 | try |
487 | { | 487 | { |
@@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
500 | { | 500 | { |
501 | m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe); | 501 | m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe); |
502 | } | 502 | } |
503 | } | 503 | } |
504 | return; | 504 | return; |
505 | } | 505 | } |
506 | m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName); | 506 | m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName); |
@@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
512 | // protected void AnnounceToAgentsRegion(Scene scene, string msg) | 512 | // protected void AnnounceToAgentsRegion(Scene scene, string msg) |
513 | // { | 513 | // { |
514 | // ScenePresence agent = null; | 514 | // ScenePresence agent = null; |
515 | // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) | 515 | // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) |
516 | // AnnounceToAgentsRegion(agent, msg); | 516 | // AnnounceToAgentsRegion(agent, msg); |
517 | // else | 517 | // else |
518 | // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); | 518 | // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); |
@@ -587,7 +587,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
587 | 587 | ||
588 | string regionName = (string)requestData["region"]; | 588 | string regionName = (string)requestData["region"]; |
589 | IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; }); | 589 | IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; }); |
590 | if (scene == null) | 590 | if (scene == null) |
591 | throw new Exception(String.Format("unknown region \"{0}\"", regionName)); | 591 | throw new Exception(String.Format("unknown region \"{0}\"", regionName)); |
592 | 592 | ||
593 | if (!m_conciergedScenes.Contains(scene)) | 593 | if (!m_conciergedScenes.Contains(scene)) |