aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs20
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs2
3 files changed, 5 insertions, 21 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}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 74392cc..86349cb 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1256,14 +1256,14 @@ namespace OpenSim.Region.Environment.Scenes
1256 { 1256 {
1257 TaskInventoryItem currentItem = part.GetInventoryItem(itemID); 1257 TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
1258 bool allowInventoryDrop = (part.GetEffectiveObjectFlags() 1258 bool allowInventoryDrop = (part.GetEffectiveObjectFlags()
1259 & (uint)PrimFlags.AllowInventoryDrop) != 0; 1259 & (uint)PrimFlags.AllowInventoryDrop) != 0;
1260 1260
1261 // Explicity allow anyone to add to the inventory if the 1261 // Explicity allow anyone to add to the inventory if the
1262 // AllowInventoryDrop flag has been set. Don't however let 1262 // AllowInventoryDrop flag has been set. Don't however let
1263 // them update an item unless they pass the external checks 1263 // them update an item unless they pass the external checks
1264 // 1264 //
1265 if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId) 1265 if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)
1266 && (currentItem != null || !allowInventoryDrop )) 1266 && (currentItem != null || !allowInventoryDrop))
1267 return; 1267 return;
1268 1268
1269 if (currentItem == null) 1269 if (currentItem == null)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 442720a..21c7905 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes
184// taskItem.SalePrice = item.SalePrice; 184// taskItem.SalePrice = item.SalePrice;
185// taskItem.SaleType = item.SaleType; 185// taskItem.SaleType = item.SaleType;
186 taskItem.CreationDate = (uint)item.CreationDate; 186 taskItem.CreationDate = (uint)item.CreationDate;
187 187
188 bool addFromAllowedDrop = false; 188 bool addFromAllowedDrop = false;
189 if (remoteClient!=null) 189 if (remoteClient!=null)
190 { 190 {