aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/Avatar
diff options
context:
space:
mode:
authorJeff Ames2008-11-15 02:21:52 +0000
committerJeff Ames2008-11-15 02:21:52 +0000
commite40fe2db26c6fae4f52df2cc350ea1e534df441a (patch)
tree7da025e47635ee7642bd92ec0e57d6adac9a6369 /OpenSim/Region/Environment/Modules/Avatar
parent* test: Add scene root agent test stub, since I'll be picking up with somethi... (diff)
downloadopensim-SC_OLD-e40fe2db26c6fae4f52df2cc350ea1e534df441a.zip
opensim-SC_OLD-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.gz
opensim-SC_OLD-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.bz2
opensim-SC_OLD-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.xz
Update svn properties, minor formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs20
1 files changed, 2 insertions, 18 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 49c4a06..2fafe9b 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -38,10 +38,8 @@ using OpenSim.Region.Environment.Scenes;
38 38
39namespace OpenSim.Region.Environment.Modules.Avatar.Chat 39namespace OpenSim.Region.Environment.Modules.Avatar.Chat
40{ 40{
41
42 public class IRCBridgeModule : IRegionModule 41 public class IRCBridgeModule : IRegionModule
43 { 42 {
44
45 private static readonly ILog m_log = 43 private static readonly ILog m_log =
46 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 45
@@ -70,13 +68,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
70 68
71 public void Initialise(Scene scene, IConfigSource config) 69 public void Initialise(Scene scene, IConfigSource config)
72 { 70 {
73
74 // Do a once-only scan of the configuration file to make 71 // Do a once-only scan of the configuration file to make
75 // sure it's basically intact. 72 // sure it's basically intact.
76 73
77 if (!configured) 74 if (!configured)
78 { 75 {
79
80 configured = true; 76 configured = true;
81 77
82 try 78 try
@@ -106,7 +102,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
106 password = config.Configs["RemoteAdmin"].GetString("access_password", password); 102 password = config.Configs["RemoteAdmin"].GetString("access_password", password);
107 scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false); 103 scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
108 } 104 }
109
110 } 105 }
111 106
112 // Iff the IRC bridge is enabled, then each new region may be 107 // Iff the IRC bridge is enabled, then each new region may be
@@ -122,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
122 { 117 {
123 m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName); 118 m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);
124 region = new RegionState(scene, m_config); 119 region = new RegionState(scene, m_config);
125 lock(m_regions) m_regions.Add(region); 120 lock (m_regions) m_regions.Add(region);
126 region.Open(); 121 region.Open();
127 } 122 }
128 catch (Exception e) 123 catch (Exception e)
@@ -135,7 +130,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
135 { 130 {
136 m_log.WarnFormat("[IRC-Bridge] Not enabled. Connect for region {0} ignored", scene.RegionInfo.RegionName); 131 m_log.WarnFormat("[IRC-Bridge] Not enabled. Connect for region {0} ignored", scene.RegionInfo.RegionName);
137 } 132 }
138
139 } 133 }
140 134
141 // This module can be called in-flight in which case PostInitialize 135 // This module can be called in-flight in which case PostInitialize
@@ -144,7 +138,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
144 138
145 public void PostInitialise() 139 public void PostInitialise()
146 { 140 {
147
148 } 141 }
149 142
150 // Called immediately before the region module is unloaded. Cleanup 143 // Called immediately before the region module is unloaded. Cleanup
@@ -152,20 +145,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
152 145
153 public void Close() 146 public void Close()
154 { 147 {
155
156 if (!enabled) 148 if (!enabled)
157 return; 149 return;
158 150
159 region.Close(); 151 region.Close();
160 lock(m_regions) m_regions.Remove(region); 152 lock (m_regions) m_regions.Remove(region);
161
162 } 153 }
163 154
164 #endregion 155 #endregion
165 156
166 public static XmlRpcResponse XmlRpcAdminMethod(XmlRpcRequest request) 157 public static XmlRpcResponse XmlRpcAdminMethod(XmlRpcRequest request)
167 { 158 {
168
169 m_log.Info("[IRC-Bridge]: XML RPC Admin Entry"); 159 m_log.Info("[IRC-Bridge]: XML RPC Admin Entry");
170 160
171 XmlRpcResponse response = new XmlRpcResponse(); 161 XmlRpcResponse response = new XmlRpcResponse();
@@ -173,7 +163,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
173 163
174 try 164 try
175 { 165 {
176
177 Hashtable requestData = (Hashtable)request.Params[0]; 166 Hashtable requestData = (Hashtable)request.Params[0];
178 bool found = false; 167 bool found = false;
179 string region = String.Empty; 168 string region = String.Empty;
@@ -209,7 +198,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
209 if (!found) throw new Exception(String.Format("Region <{0}> not found", region)); 198 if (!found) throw new Exception(String.Format("Region <{0}> not found", region));
210 199
211 responseData["success"] = true; 200 responseData["success"] = true;
212
213 } 201 }
214 catch (Exception e) 202 catch (Exception e)
215 { 203 {
@@ -217,7 +205,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
217 205
218 responseData["success"] = "false"; 206 responseData["success"] = "false";
219 responseData["error"] = e.Message; 207 responseData["error"] = e.Message;
220
221 } 208 }
222 finally 209 finally
223 { 210 {
@@ -227,9 +214,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
227 m_log.Debug("[IRC-Bridge]: XML RPC Admin Exit"); 214 m_log.Debug("[IRC-Bridge]: XML RPC Admin Exit");
228 215
229 return response; 216 return response;
230
231 } 217 }
232
233 } 218 }
234
235} 219}