aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ChatModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ChatModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs49
1 files changed, 27 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 6638e95..ab6b791 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -91,7 +91,8 @@ namespace OpenSim.Region.Environment.Modules
91 91
92 // setup IRC Relay 92 // setup IRC Relay
93 if (m_irc == null) { m_irc = new IRCChatModule(config); } 93 if (m_irc == null) { m_irc = new IRCChatModule(config); }
94 if (m_irc_connector == null) { 94 if (m_irc_connector == null)
95 {
95 m_irc_connector = new Thread(IRCConnectRun); 96 m_irc_connector = new Thread(IRCConnectRun);
96 m_irc_connector.Name = "IRCConnectorThread"; 97 m_irc_connector.Name = "IRCConnectorThread";
97 m_irc_connector.IsBackground = true; 98 m_irc_connector.IsBackground = true;
@@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules
106 try 107 try
107 { 108 {
108 //m_irc.Connect(m_scenes); 109 //m_irc.Connect(m_scenes);
109 if (m_irc_connector == null) { 110 if (m_irc_connector == null)
111 {
110 m_irc_connector = new Thread(IRCConnectRun); 112 m_irc_connector = new Thread(IRCConnectRun);
111 m_irc_connector.Name = "IRCConnectorThread"; 113 m_irc_connector.Name = "IRCConnectorThread";
112 m_irc_connector.IsBackground = true; 114 m_irc_connector.IsBackground = true;
113 } 115 }
114 if (!m_irc_connector.IsAlive) { 116 if (!m_irc_connector.IsAlive)
117 {
115 m_irc_connector.Start(); 118 m_irc_connector.Start();
116 OpenSim.Framework.ThreadTracker.Add(m_irc_connector); 119 OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
117 } 120 }
@@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules
255 // In a non-blocking way. Eventually the connector will get it started 258 // In a non-blocking way. Eventually the connector will get it started
256 try 259 try
257 { 260 {
258 if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); 261 if (m_irc_connector == null)
259 m_irc_connector.Name = "IRCConnectorThread"; 262 {
260 m_irc_connector.IsBackground = true; 263 m_irc_connector = new Thread(IRCConnectRun);
264 m_irc_connector.Name = "IRCConnectorThread";
265 m_irc_connector.IsBackground = true;
261 } 266 }
262 if (!m_irc_connector.IsAlive) { 267 if (!m_irc_connector.IsAlive)
268 {
263 m_irc_connector.Start(); 269 m_irc_connector.Start();
264 OpenSim.Framework.ThreadTracker.Add(m_irc_connector); 270 OpenSim.Framework.ThreadTracker.Add(m_irc_connector);
265 } 271 }
@@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules
298 if ((m_irc.Enabled)&&(!m_irc.Connected)) 304 if ((m_irc.Enabled)&&(!m_irc.Connected))
299 { 305 {
300 m_irc.Connect(m_scenes); 306 m_irc.Connect(m_scenes);
301
302 } 307 }
303 Thread.Sleep(15000); 308 Thread.Sleep(15000);
304 } 309 }
@@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules
625 foreach (Scene m_scene in m_scenes) 630 foreach (Scene m_scene in m_scenes)
626 { 631 {
627 m_scene.ForEachScenePresence(delegate(ScenePresence avatar) 632 m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
628 { 633 {
629 if (!avatar.IsChildAgent) 634 if (!avatar.IsChildAgent)
630 { 635 {
631 avatar.ControllingClient.SendChatMessage( 636 avatar.ControllingClient.SendChatMessage(
632 Helpers.StringToField(message), 255, 637 Helpers.StringToField(message), 255,
633 pos, sender, 638 pos, sender,
634 LLUUID.Zero); 639 LLUUID.Zero);
635 } 640 }
636 }); 641 });
637 } 642 }
638 } 643 }
639 catch (Exception ex) // IRC gate should not crash Sim 644 catch (Exception ex) // IRC gate should not crash Sim
@@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules
644 649
645 public enum ErrorReplies 650 public enum ErrorReplies
646 { 651 {
647 NotRegistered = 451, // ":You have not registered" 652 NotRegistered = 451, // ":You have not registered"
648 NicknameInUse = 433 // "<nick> :Nickname is already in use" 653 NicknameInUse = 433 // "<nick> :Nickname is already in use"
649 } 654 }
650 655
651 public enum Replies 656 public enum Replies
652 { 657 {
653 MotdStart = 375, // ":- <server> Message of the day - " 658 MotdStart = 375, // ":- <server> Message of the day - "
654 Motd = 372, // ":- <text>" 659 Motd = 372, // ":- <text>"
655 EndOfMotd = 376 // ":End of /MOTD command" 660 EndOfMotd = 376 // ":End of /MOTD command"
656 } 661 }
657 662
658 public void ProcessIRCCommand(string command) 663 public void ProcessIRCCommand(string command)