diff options
author | Jeff Ames | 2008-05-28 03:44:49 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-28 03:44:49 +0000 |
commit | 5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4 (patch) | |
tree | ea980f49f1a6bb40ba037a87581a3d741c3d3c56 /OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | |
parent | Thank you kindly, Melanie for a patch that: (diff) | |
download | opensim-SC-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.zip opensim-SC-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.gz opensim-SC-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.bz2 opensim-SC-5752c1f5c2ee069e2ff5ffc0ff2f186d7454c5c4.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs index c8d5f80..85262f5 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | |||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
43 | { | 43 | { |
44 | public class IRCBridgeModule : IRegionModule | 44 | public class IRCBridgeModule : IRegionModule |
45 | { | 45 | { |
46 | private static readonly ILog m_log = | 46 | private static readonly ILog m_log = |
47 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 47 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | private const int DEBUG_CHANNEL = 2147483647; | 49 | private const int DEBUG_CHANNEL = 2147483647; |
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
68 | { | 68 | { |
69 | try | 69 | try |
70 | { | 70 | { |
71 | if ((m_config = config.Configs["IRC"]) == null) | 71 | if ((m_config = config.Configs["IRC"]) == null) |
72 | { | 72 | { |
73 | m_log.InfoFormat("[IRC] module not configured"); | 73 | m_log.InfoFormat("[IRC] module not configured"); |
74 | return; | 74 | return; |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
85 | m_log.Info("[IRC] module not configured"); | 85 | m_log.Info("[IRC] module not configured"); |
86 | return; | 86 | return; |
87 | } | 87 | } |
88 | 88 | ||
89 | lock (m_syncInit) | 89 | lock (m_syncInit) |
90 | { | 90 | { |
91 | 91 | ||
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
118 | m_irc_connector.Name = "IRCConnectorThread"; | 118 | m_irc_connector.Name = "IRCConnectorThread"; |
119 | m_irc_connector.IsBackground = true; | 119 | m_irc_connector.IsBackground = true; |
120 | } | 120 | } |
121 | m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName, | 121 | m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName, |
122 | m_defaultzone); | 122 | m_defaultzone); |
123 | } | 123 | } |
124 | } | 124 | } |
@@ -221,9 +221,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
221 | 221 | ||
222 | if (e.Message.StartsWith("/me ") && (null != avatar)) | 222 | if (e.Message.StartsWith("/me ") && (null != avatar)) |
223 | e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4)); | 223 | e.Message = String.Format("{0} {1}", fromName, e.Message.Substring(4)); |
224 | 224 | ||
225 | // this is to keep objects from talking to IRC | 225 | // this is to keep objects from talking to IRC |
226 | if (m_irc.Connected && (avatar != null)) | 226 | if (m_irc.Connected && (avatar != null)) |
227 | m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); | 227 | m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); |
228 | } | 228 | } |
229 | 229 | ||
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
244 | if ((m_irc.Enabled) && (m_irc.Connected)) | 244 | if ((m_irc.Enabled) && (m_irc.Connected)) |
245 | { | 245 | { |
246 | m_log.DebugFormat("[IRC] {0} logging on", clientName); | 246 | m_log.DebugFormat("[IRC] {0} logging on", clientName); |
247 | m_irc.PrivMsg(m_irc.Nick, "Sim", | 247 | m_irc.PrivMsg(m_irc.Nick, "Sim", |
248 | String.Format("notices {0} logging on", clientName)); | 248 | String.Format("notices {0} logging on", clientName)); |
249 | } | 249 | } |
250 | m_last_new_user = clientName; | 250 | m_last_new_user = clientName; |
@@ -310,7 +310,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
310 | m_log.InfoFormat("[IRC]: {0} logging out", clientName); | 310 | m_log.InfoFormat("[IRC]: {0} logging out", clientName); |
311 | } | 311 | } |
312 | 312 | ||
313 | if (m_last_new_user == clientName) | 313 | if (m_last_new_user == clientName) |
314 | m_last_new_user = null; | 314 | m_last_new_user = null; |
315 | } | 315 | } |
316 | } | 316 | } |
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
489 | } | 489 | } |
490 | catch (Exception e) | 490 | catch (Exception e) |
491 | { | 491 | { |
492 | m_log.ErrorFormat("[IRC] cannot connect to {0}:{1}: {2}", | 492 | m_log.ErrorFormat("[IRC] cannot connect to {0}:{1}: {2}", |
493 | m_server, m_port, e.Message); | 493 | m_server, m_port, e.Message); |
494 | } | 494 | } |
495 | return m_connected; | 495 | return m_connected; |
@@ -617,16 +617,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
617 | 617 | ||
618 | // is message "\001ACTION foo | 618 | // is message "\001ACTION foo |
619 | // bar\001"? -> "/me foo bar" | 619 | // bar\001"? -> "/me foo bar" |
620 | if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) | 620 | if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) |
621 | c.Message = String.Format("/me {0}", c.Message.Substring(8, c.Message.Length - 9)); | 621 | c.Message = String.Format("/me {0}", c.Message.Substring(8, c.Message.Length - 9)); |
622 | 622 | ||
623 | foreach (Scene scene in m_scenes) | 623 | foreach (Scene scene in m_scenes) |
624 | { | 624 | { |
625 | c.Scene = scene; | 625 | c.Scene = scene; |
626 | scene.EventManager.TriggerOnChatBroadcast(this, c); | 626 | scene.EventManager.TriggerOnChatBroadcast(this, c); |
627 | } | 627 | } |
628 | } | 628 | } |
629 | 629 | ||
630 | Thread.Sleep(150); | 630 | Thread.Sleep(150); |
631 | continue; | 631 | continue; |
632 | } | 632 | } |