aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs (renamed from OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCBridgeModule.cs)36
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs (renamed from OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCConnector.cs)12
3 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
index f9089cb..4fc744b 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChannelState.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
97 97
98 // IRC connector reference 98 // IRC connector reference
99 99
100 internal XIRCConnector irc = null; 100 internal IRCConnector irc = null;
101 101
102 internal int idn = _idk_++; 102 internal int idn = _idk_++;
103 103
@@ -256,7 +256,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
256 // values that, while independent of the IRC connetion, do still distinguish 256 // values that, while independent of the IRC connetion, do still distinguish
257 // this region's behavior. 257 // this region's behavior.
258 258
259 foreach (ChannelState xcs in XIRCBridgeModule.m_channels) 259 foreach (ChannelState xcs in IRCBridgeModule.m_channels)
260 { 260 {
261 if (cs.IsAPerfectMatchFor(xcs)) 261 if (cs.IsAPerfectMatchFor(xcs))
262 { 262 {
@@ -279,9 +279,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
279 279
280 m_log.DebugFormat("[IRC-Channel-{0}] New channel required", cs.idn); 280 m_log.DebugFormat("[IRC-Channel-{0}] New channel required", cs.idn);
281 281
282 if ((cs.irc = new XIRCConnector(cs)) != null) 282 if ((cs.irc = new IRCConnector(cs)) != null)
283 { 283 {
284 XIRCBridgeModule.m_channels.Add(cs); 284 IRCBridgeModule.m_channels.Add(cs);
285 285
286 m_log.InfoFormat("[IRC-Channel-{0}] New channel initialized for {1}, nick: {2}, commands {3}, private channels {4}", 286 m_log.InfoFormat("[IRC-Channel-{0}] New channel initialized for {1}, nick: {2}, commands {3}, private channels {4}",
287 cs.idn, rs.Region, cs.DefaultZone, 287 cs.idn, rs.Region, cs.DefaultZone,
@@ -554,7 +554,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
554 // contains information that is not differentiating from an 554 // contains information that is not differentiating from an
555 // IRC point-of-view. 555 // IRC point-of-view.
556 556
557 public static void OSChat(XIRCConnector p_irc, OSChatMessage c, bool cmsg) 557 public static void OSChat(IRCConnector p_irc, OSChatMessage c, bool cmsg)
558 { 558 {
559 559
560 // m_log.DebugFormat("[IRC-OSCHAT] from {0}:{1}", p_irc.Server, p_irc.IrcChannel); 560 // m_log.DebugFormat("[IRC-OSCHAT] from {0}:{1}", p_irc.Server, p_irc.IrcChannel);
@@ -568,7 +568,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
568 // Note that this code is responsible for completing some of the 568 // Note that this code is responsible for completing some of the
569 // settings for the inbound OSChatMessage 569 // settings for the inbound OSChatMessage
570 570
571 foreach (ChannelState cs in XIRCBridgeModule.m_channels) 571 foreach (ChannelState cs in IRCBridgeModule.m_channels)
572 { 572 {
573 if ( p_irc == cs.irc) 573 if ( p_irc == cs.irc)
574 { 574 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 9bd7946..e413290 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -39,7 +39,7 @@ using OpenSim.Region.Environment.Scenes;
39namespace OpenSim.Region.Environment.Modules.Avatar.Chat 39namespace OpenSim.Region.Environment.Modules.Avatar.Chat
40{ 40{
41 41
42 public class XIRCBridgeModule : IRegionModule 42 public class IRCBridgeModule : IRegionModule
43 { 43 {
44 44
45 private static readonly ILog m_log = 45 private static readonly ILog m_log =
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
58 58
59 public string Name 59 public string Name
60 { 60 {
61 get { return "XIRCBridgeModule"; } 61 get { return "IRCBridgeModule"; }
62 } 62 }
63 63
64 public bool IsSharedModule 64 public bool IsSharedModule
@@ -81,19 +81,19 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
81 { 81 {
82 if ((m_config = config.Configs["IRC"]) == null) 82 if ((m_config = config.Configs["IRC"]) == null)
83 { 83 {
84 m_log.InfoFormat("[XIRC-Bridge] module not configured"); 84 m_log.InfoFormat("[IRC-Bridge] module not configured");
85 return; 85 return;
86 } 86 }
87 87
88 if (!m_config.GetBoolean("enabled", false)) 88 if (!m_config.GetBoolean("enabled", false))
89 { 89 {
90 m_log.InfoFormat("[XIRC-Bridge] module disabled in configuration"); 90 m_log.InfoFormat("[IRC-Bridge] module disabled in configuration");
91 return; 91 return;
92 } 92 }
93 } 93 }
94 catch (Exception e) 94 catch (Exception e)
95 { 95 {
96 m_log.ErrorFormat("[XIRC-Bridge] configuration failed : {0}", e.Message); 96 m_log.ErrorFormat("[IRC-Bridge] configuration failed : {0}", e.Message);
97 return; 97 return;
98 } 98 }
99 99
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
102 if (config.Configs["RemoteAdmin"] != null) 102 if (config.Configs["RemoteAdmin"] != null)
103 { 103 {
104 password = config.Configs["RemoteAdmin"].GetString("access_password", password); 104 password = config.Configs["RemoteAdmin"].GetString("access_password", password);
105 scene.CommsManager.HttpServer.AddXmlRPCHandler("xirc_admin", XmlRpcAdminMethod, false); 105 scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
106 } 106 }
107 107
108 } 108 }
@@ -115,18 +115,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
115 { 115 {
116 try 116 try
117 { 117 {
118 m_log.InfoFormat("[XIRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName); 118 m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);
119 m_regions.Add(new RegionState(scene, m_config)); 119 m_regions.Add(new RegionState(scene, m_config));
120 } 120 }
121 catch (Exception e) 121 catch (Exception e)
122 { 122 {
123 m_log.WarnFormat("[XIRC-Bridge] Region {0} not connected to IRC : {1}", scene.RegionInfo.RegionName, e.Message); 123 m_log.WarnFormat("[IRC-Bridge] Region {0} not connected to IRC : {1}", scene.RegionInfo.RegionName, e.Message);
124 m_log.Debug(e); 124 m_log.Debug(e);
125 } 125 }
126 } 126 }
127 else 127 else
128 { 128 {
129 m_log.WarnFormat("[XIRC-Bridge] Not enabled. Connect for region {0} ignored", scene.RegionInfo.RegionName); 129 m_log.WarnFormat("[IRC-Bridge] Not enabled. Connect for region {0} ignored", scene.RegionInfo.RegionName);
130 } 130 }
131 131
132 } 132 }
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
144 144
145 foreach (RegionState region in m_regions) 145 foreach (RegionState region in m_regions)
146 { 146 {
147 m_log.InfoFormat("[XIRC-Bridge] Opening connection for {0}:{1} on IRC server {2}:{3}", 147 m_log.InfoFormat("[IRC-Bridge] Opening connection for {0}:{1} on IRC server {2}:{3}",
148 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel); 148 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel);
149 try 149 try
150 { 150 {
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
152 } 152 }
153 catch (Exception e) 153 catch (Exception e)
154 { 154 {
155 m_log.ErrorFormat("[XIRC-Bridge] Open failed for {0}:{1} on IRC server {2}:{3} : {4}", 155 m_log.ErrorFormat("[IRC-Bridge] Open failed for {0}:{1} on IRC server {2}:{3} : {4}",
156 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel, 156 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel,
157 e.Message); 157 e.Message);
158 } 158 }
@@ -173,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
173 173
174 foreach (RegionState region in m_regions) 174 foreach (RegionState region in m_regions)
175 { 175 {
176 m_log.InfoFormat("[XIRC-Bridge] Closing connection for {0}:{1} on IRC server {2}:{3}", 176 m_log.InfoFormat("[IRC-Bridge] Closing connection for {0}:{1} on IRC server {2}:{3}",
177 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel); 177 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel);
178 try 178 try
179 { 179 {
@@ -181,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
181 } 181 }
182 catch (Exception e) 182 catch (Exception e)
183 { 183 {
184 m_log.ErrorFormat("[XIRC-Bridge] Close failed for {0}:{1} on IRC server {2}:{3} : {4}", 184 m_log.ErrorFormat("[IRC-Bridge] Close failed for {0}:{1} on IRC server {2}:{3} : {4}",
185 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel, 185 region.Region, region.cs.BaseNickname, region.cs.Server, region.cs.IrcChannel,
186 e.Message); 186 e.Message);
187 } 187 }
@@ -191,7 +191,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
191 191
192 foreach (ChannelState channel in m_channels) 192 foreach (ChannelState channel in m_channels)
193 { 193 {
194 m_log.InfoFormat("[XIRC-Bridge] Closing connection for {0} on IRC server {1}:{2}", 194 m_log.InfoFormat("[IRC-Bridge] Closing connection for {0} on IRC server {1}:{2}",
195 channel.BaseNickname, channel.Server, channel.IrcChannel); 195 channel.BaseNickname, channel.Server, channel.IrcChannel);
196 try 196 try
197 { 197 {
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
199 } 199 }
200 catch (Exception e) 200 catch (Exception e)
201 { 201 {
202 m_log.ErrorFormat("[XIRC-Bridge] Close failed for {0} on IRC server {1}:{2} : {3}", 202 m_log.ErrorFormat("[IRC-Bridge] Close failed for {0} on IRC server {1}:{2} : {3}",
203 channel.BaseNickname, channel.Server, channel.IrcChannel, 203 channel.BaseNickname, channel.Server, channel.IrcChannel,
204 e.Message); 204 e.Message);
205 } 205 }
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
212 public XmlRpcResponse XmlRpcAdminMethod(XmlRpcRequest request) 212 public XmlRpcResponse XmlRpcAdminMethod(XmlRpcRequest request)
213 { 213 {
214 214
215 m_log.Info("[XIRC-Bridge]: XML RPC Admin Entry"); 215 m_log.Info("[IRC-Bridge]: XML RPC Admin Entry");
216 216
217 XmlRpcResponse response = new XmlRpcResponse(); 217 XmlRpcResponse response = new XmlRpcResponse();
218 Hashtable responseData = new Hashtable(); 218 Hashtable responseData = new Hashtable();
@@ -258,7 +258,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
258 } 258 }
259 catch (Exception e) 259 catch (Exception e)
260 { 260 {
261 m_log.InfoFormat("[XIRC-Bridge] XML RPC Admin request failed : {0}", e.Message); 261 m_log.InfoFormat("[IRC-Bridge] XML RPC Admin request failed : {0}", e.Message);
262 262
263 responseData["success"] = "false"; 263 responseData["success"] = "false";
264 responseData["error"] = e.Message; 264 responseData["error"] = e.Message;
@@ -269,7 +269,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
269 response.Value = responseData; 269 response.Value = responseData;
270 } 270 }
271 271
272 m_log.Debug("[XIRC-Bridge]: XML RPC Admin Exit"); 272 m_log.Debug("[IRC-Bridge]: XML RPC Admin Exit");
273 273
274 return response; 274 return response;
275 275
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCConnector.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
index f6a07b8..b9422f3 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/XIRCConnector.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs
@@ -42,7 +42,7 @@ using OpenSim.Region.Environment.Scenes;
42 42
43namespace OpenSim.Region.Environment.Modules.Avatar.Chat 43namespace OpenSim.Region.Environment.Modules.Avatar.Chat
44{ 44{
45 public class XIRCConnector 45 public class IRCConnector
46 { 46 {
47 47
48 #region Global (static) state 48 #region Global (static) state
@@ -64,13 +64,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
64 64
65 // List of configured connectors 65 // List of configured connectors
66 66
67 private static List<XIRCConnector> m_connectors = new List<XIRCConnector>(); 67 private static List<IRCConnector> m_connectors = new List<IRCConnector>();
68 68
69 // Watchdog state 69 // Watchdog state
70 70
71 private static System.Timers.Timer m_watchdog = null; 71 private static System.Timers.Timer m_watchdog = null;
72 72
73 static XIRCConnector() 73 static IRCConnector()
74 { 74 {
75 m_log.DebugFormat("[IRC-Connector]: Static initialization started"); 75 m_log.DebugFormat("[IRC-Connector]: Static initialization started");
76 m_watchdog = new System.Timers.Timer(WD_INTERVAL); 76 m_watchdog = new System.Timers.Timer(WD_INTERVAL);
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
168 168
169 #region connector instance management 169 #region connector instance management
170 170
171 internal XIRCConnector(ChannelState cs) 171 internal IRCConnector(ChannelState cs)
172 { 172 {
173 173
174 // Prepare network interface 174 // Prepare network interface
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
225 225
226 } 226 }
227 227
228 ~XIRCConnector() 228 ~IRCConnector()
229 { 229 {
230 m_watchdog.Stop(); 230 m_watchdog.Stop();
231 Close(); 231 Close();
@@ -797,7 +797,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
797 _pdk_ = (_pdk_+1)%PING_PERIOD; // cycle the ping trigger 797 _pdk_ = (_pdk_+1)%PING_PERIOD; // cycle the ping trigger
798 _icc_++; // increment the inter-consecutive-connect-delay counter 798 _icc_++; // increment the inter-consecutive-connect-delay counter
799 799
800 foreach (XIRCConnector connector in m_connectors) 800 foreach (IRCConnector connector in m_connectors)
801 { 801 {
802 if (connector.Enabled) 802 if (connector.Enabled)
803 { 803 {