diff options
author | Jeff Ames | 2008-11-15 02:21:52 +0000 |
---|---|---|
committer | Jeff Ames | 2008-11-15 02:21:52 +0000 |
commit | e40fe2db26c6fae4f52df2cc350ea1e534df441a (patch) | |
tree | 7da025e47635ee7642bd92ec0e57d6adac9a6369 /OpenSim | |
parent | * test: Add scene root agent test stub, since I'll be picking up with somethi... (diff) | |
download | opensim-SC-e40fe2db26c6fae4f52df2cc350ea1e534df441a.zip opensim-SC-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.gz opensim-SC-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.bz2 opensim-SC-e40fe2db26c6fae4f52df2cc350ea1e534df441a.tar.xz |
Update svn properties, minor formatting cleanup.
Diffstat (limited to 'OpenSim')
5 files changed, 9 insertions, 25 deletions
diff --git a/OpenSim/Data/Tests/BasicRegionTest.cs b/OpenSim/Data/Tests/BasicRegionTest.cs index a280af3..ff8f8c3 100644 --- a/OpenSim/Data/Tests/BasicRegionTest.cs +++ b/OpenSim/Data/Tests/BasicRegionTest.cs | |||
@@ -591,8 +591,8 @@ namespace OpenSim.Data.Tests | |||
591 | Assert.That(t.ItemID,Is.EqualTo(id)); | 591 | Assert.That(t.ItemID,Is.EqualTo(id)); |
592 | Assert.That(t.LastOwnerID, Is.EqualTo(sog.RootPart.LastOwnerID)); | 592 | Assert.That(t.LastOwnerID, Is.EqualTo(sog.RootPart.LastOwnerID)); |
593 | Assert.That(t.NextPermissions, Is.EqualTo(nextperm)); | 593 | Assert.That(t.NextPermissions, Is.EqualTo(nextperm)); |
594 | // Ownership changes when you drop an object into an object | 594 | // Ownership changes when you drop an object into an object |
595 | // owned by someone else | 595 | // owned by someone else |
596 | Assert.That(t.OwnerID,Is.EqualTo(sog.RootPart.OwnerID)); | 596 | Assert.That(t.OwnerID,Is.EqualTo(sog.RootPart.OwnerID)); |
597 | Assert.That(t.CurrentPermissions, Is.EqualTo(curperm | 8)); | 597 | Assert.That(t.CurrentPermissions, Is.EqualTo(curperm | 8)); |
598 | Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID)); | 598 | Assert.That(t.ParentID,Is.EqualTo(sog.RootPart.FolderID)); |
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 | ||
39 | namespace OpenSim.Region.Environment.Modules.Avatar.Chat | 39 | namespace 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 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index c1d718e..4507583 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4007,8 +4007,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4007 | else | 4007 | else |
4008 | m_host.ParentGroup.RootPart.AllowedDrop = false; | 4008 | m_host.ParentGroup.RootPart.AllowedDrop = false; |
4009 | 4009 | ||
4010 | // Update the object flags | 4010 | // Update the object flags |
4011 | m_host.ParentGroup.RootPart.aggregateScriptEvents(); | 4011 | m_host.ParentGroup.RootPart.aggregateScriptEvents(); |
4012 | } | 4012 | } |
4013 | 4013 | ||
4014 | public LSL_Vector llGetSunDirection() | 4014 | public LSL_Vector llGetSunDirection() |