aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ChatModule.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-02-02 00:47:28 +0000
committerCharles Krinke2008-02-02 00:47:28 +0000
commita9b69f3880c9e9f186b8cf26c1f4181166ee7806 (patch)
tree6b8e479e08c93483af592f7ed60f7e45134e9c60 /OpenSim/Region/Environment/Modules/ChatModule.cs
parentForgot to create an object before use. Now why can't .Net just do that itself... (diff)
downloadopensim-SC_OLD-a9b69f3880c9e9f186b8cf26c1f4181166ee7806.zip
opensim-SC_OLD-a9b69f3880c9e9f186b8cf26c1f4181166ee7806.tar.gz
opensim-SC_OLD-a9b69f3880c9e9f186b8cf26c1f4181166ee7806.tar.bz2
opensim-SC_OLD-a9b69f3880c9e9f186b8cf26c1f4181166ee7806.tar.xz
Thank you very much, Kinoc for : Moved the Listener loop try/catch to a better position.
Uses the IRC nick as the default when user location cannot be determined.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ChatModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs25
1 files changed, 17 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index e07c680..5ca0ed7 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Region.Environment.Modules
54 54
55 private string m_last_new_user = null; 55 private string m_last_new_user = null;
56 private string m_last_leaving_user = null; 56 private string m_last_leaving_user = null;
57 private string m_defaultzone = null;
57 internal object m_syncInit = new object(); 58 internal object m_syncInit = new object();
58 internal object m_syncLogout = new object(); 59 internal object m_syncLogout = new object();
59 private Thread m_irc_connector=null; 60 private Thread m_irc_connector=null;
@@ -78,6 +79,13 @@ namespace OpenSim.Region.Environment.Modules
78 catch (Exception) 79 catch (Exception)
79 { 80 {
80 } 81 }
82 try
83 {
84 m_defaultzone = config.Configs["IRC"].GetString("nick","Sim");
85 }
86 catch (Exception)
87 {
88 }
81 89
82 if (!m_scenes.Contains(scene)) 90 if (!m_scenes.Contains(scene))
83 { 91 {
@@ -302,7 +310,8 @@ namespace OpenSim.Region.Environment.Modules
302 }); 310 });
303 if (sourceRegion != null) return sourceRegion; 311 if (sourceRegion != null) return sourceRegion;
304 } 312 }
305 return "Sim"; 313 if (m_defaultzone == null) { m_defaultzone = "Sim"; }
314 return m_defaultzone;
306 } 315 }
307 } 316 }
308 317
@@ -515,7 +524,7 @@ namespace OpenSim.Region.Environment.Modules
515 } 524 }
516 catch (Exception ex) 525 catch (Exception ex)
517 { 526 {
518 m_log.Error("IRC", "PingRun exception trap:" + ex.ToString()); 527 m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace);
519 } 528 }
520 } 529 }
521 } 530 }
@@ -526,10 +535,10 @@ namespace OpenSim.Region.Environment.Modules
526 LLVector3 pos = new LLVector3(128, 128, 20); 535 LLVector3 pos = new LLVector3(128, 128, 20);
527 while (true) 536 while (true)
528 { 537 {
529 while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) 538 try
539 {
540 while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null))
530 { 541 {
531 try
532 {
533 // Console.WriteLine(inputLine); 542 // Console.WriteLine(inputLine);
534 if (inputLine.Contains(m_channel)) 543 if (inputLine.Contains(m_channel))
535 { 544 {
@@ -565,6 +574,7 @@ namespace OpenSim.Region.Environment.Modules
565 ProcessIRCCommand(inputLine); 574 ProcessIRCCommand(inputLine);
566 } 575 }
567 Thread.Sleep(150); 576 Thread.Sleep(150);
577 }
568 } 578 }
569 catch (IOException) 579 catch (IOException)
570 { 580 {
@@ -573,9 +583,8 @@ namespace OpenSim.Region.Environment.Modules
573 } 583 }
574 catch (Exception ex) 584 catch (Exception ex)
575 { 585 {
576 m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()); 586 m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace);
577 } 587 }
578 }
579 } 588 }
580 } 589 }
581 590
@@ -600,7 +609,7 @@ namespace OpenSim.Region.Environment.Modules
600 } 609 }
601 catch (Exception ex) // IRC gate should not crash Sim 610 catch (Exception ex) // IRC gate should not crash Sim
602 { 611 {
603 m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString()); 612 m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace);
604 613
605 } 614 }
606 615