aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs10
-rw-r--r--OpenSim/Framework/Client/IClientIPEndpoint.cs29
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs20
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs29
-rw-r--r--OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs29
-rw-r--r--OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs29
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs10
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs2
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs35
-rw-r--r--OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs31
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs8
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs2
-rw-r--r--OpenSim/Tests/Common/Mock/BaseAssetRepository.cs27
-rw-r--r--OpenSim/Tests/Common/Mock/TestAssetCache.cs29
-rw-r--r--OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs29
-rw-r--r--OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs27
-rw-r--r--OpenSim/Tests/Common/Setup/GetAssetStreamHandlerTestHelpers.cs29
-rw-r--r--OpenSim/Tools/pCampBot/PhysicsBot.cs72
20 files changed, 374 insertions, 77 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index e05f7dc..9ce9a89 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -1191,7 +1191,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1191 1191
1192 if (requestData.Contains("gender")) 1192 if (requestData.Contains("gender"))
1193 { 1193 {
1194 switch((string)requestData["gender"]) 1194 switch ((string)requestData["gender"])
1195 { 1195 {
1196 case "m" : 1196 case "m" :
1197 model = dmale; 1197 model = dmale;
@@ -1215,7 +1215,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1215 1215
1216 // No appearance attributes were set 1216 // No appearance attributes were set
1217 1217
1218 if(model == String.Empty) 1218 if (model == String.Empty)
1219 { 1219 {
1220 m_log.DebugFormat("[RADMIN] Appearance update not requested"); 1220 m_log.DebugFormat("[RADMIN] Appearance update not requested");
1221 return; 1221 return;
@@ -1430,7 +1430,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1430 1430
1431 // Load up any included assets. Duplicates will be ignored 1431 // Load up any included assets. Duplicates will be ignored
1432 assets = doc.GetElementsByTagName("RequiredAsset"); 1432 assets = doc.GetElementsByTagName("RequiredAsset");
1433 foreach(XmlNode asset in assets) 1433 foreach (XmlNode asset in assets)
1434 { 1434 {
1435 AssetBase rass = new AssetBase(); 1435 AssetBase rass = new AssetBase();
1436 rass.FullID = UUID.Random(); 1436 rass.FullID = UUID.Random();
@@ -1851,7 +1851,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1851 { 1851 {
1852 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted; 1852 scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
1853 archiver.ArchiveRegion(filename); 1853 archiver.ArchiveRegion(filename);
1854 lock(SOLock) Monitor.Wait(SOLock,5000); 1854 lock (SOLock) Monitor.Wait(SOLock,5000);
1855 scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted; 1855 scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
1856 } 1856 }
1857 else 1857 else
@@ -1881,7 +1881,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
1881 private void RemoteAdminOarSaveCompleted(Guid uuid, string name) 1881 private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
1882 { 1882 {
1883 m_log.DebugFormat("[RADMIN] File processing complete for {0}", name); 1883 m_log.DebugFormat("[RADMIN] File processing complete for {0}", name);
1884 lock(SOLock) Monitor.Pulse(SOLock); 1884 lock (SOLock) Monitor.Pulse(SOLock);
1885 } 1885 }
1886 1886
1887 public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request) 1887 public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request)
diff --git a/OpenSim/Framework/Client/IClientIPEndpoint.cs b/OpenSim/Framework/Client/IClientIPEndpoint.cs
index d59bd31..2b99bf0 100644
--- a/OpenSim/Framework/Client/IClientIPEndpoint.cs
+++ b/OpenSim/Framework/Client/IClientIPEndpoint.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Net; 30using System.Net;
4using System.Text; 31using System.Text;
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
index b35c791..d8a22b1 100644
--- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs
+++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs
@@ -488,16 +488,16 @@ namespace OpenSim.Framework.Servers
488 } 488 }
489 489
490 public string StatReport(OSHttpRequest httpRequest) 490 public string StatReport(OSHttpRequest httpRequest)
491 { 491 {
492 // If we catch a request for "callback", wrap the response in the value for jsonp 492 // If we catch a request for "callback", wrap the response in the value for jsonp
493 if( httpRequest.Query.ContainsKey("callback")) 493 if ( httpRequest.Query.ContainsKey("callback"))
494 { 494 {
495 return httpRequest.Query["callback"].ToString() + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");"; 495 return httpRequest.Query["callback"].ToString() + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");";
496 } 496 }
497 else 497 else
498 { 498 {
499 return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ); 499 return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version );
500 } 500 }
501 } 501 }
502 502
503 protected void RemovePIDFile() 503 protected void RemovePIDFile()
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
index c47a44a..d11259f 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseRequestHandler.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Framework.Servers.HttpServer
68 68
69 protected bool CheckParam(string path) 69 protected bool CheckParam(string path)
70 { 70 {
71 if(String.IsNullOrEmpty(path)) 71 if (String.IsNullOrEmpty(path))
72 { 72 {
73 return false; 73 return false;
74 } 74 }
diff --git a/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs b/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs
index dbd23b2..97c609c 100644
--- a/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs
+++ b/OpenSim/Framework/Servers/HttpServer/Tests/BaseRequestHandlerTests.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using NUnit.Framework; 31using NUnit.Framework;
diff --git a/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
index b3cccfd..b782a55 100644
--- a/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
+++ b/OpenSim/Framework/Servers/Tests/CachedGetAssetStreamHandlerTests.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using NUnit.Framework; 31using NUnit.Framework;
diff --git a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
index 51dd79d..a9b7d3c 100644
--- a/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
+++ b/OpenSim/Framework/Servers/Tests/GetAssetStreamHandlerTests.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Net; 30using System.Net;
4using System.Text; 31using System.Text;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index f6a326f..a52eb9a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -10708,7 +10708,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10708 { 10708 {
10709 get 10709 get
10710 { 10710 {
10711 if(m_userEndPoint is IPEndPoint) 10711 if (m_userEndPoint is IPEndPoint)
10712 { 10712 {
10713 IPEndPoint ep = (IPEndPoint)m_userEndPoint; 10713 IPEndPoint ep = (IPEndPoint)m_userEndPoint;
10714 10714
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
index 4a94814..c315c87 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
189 } 189 }
190 190
191 if (item.Sequence != 0) 191 if (item.Sequence != 0)
192 lock(contents) contents.Add(item.Sequence); 192 lock (contents) contents.Add(item.Sequence);
193 193
194 lock (this) 194 lock (this)
195 { 195 {
@@ -241,7 +241,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
241 item.TickCount = System.Environment.TickCount; 241 item.TickCount = System.Environment.TickCount;
242 if (item.Sequence == 0) 242 if (item.Sequence == 0)
243 return item; 243 return item;
244 lock(contents) 244 lock (contents)
245 { 245 {
246 if (contents.Contains(item.Sequence)) 246 if (contents.Contains(item.Sequence))
247 if (contents.Remove(item.Sequence)) 247 if (contents.Remove(item.Sequence))
@@ -252,13 +252,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
252 252
253 public void Cancel(uint sequence) 253 public void Cancel(uint sequence)
254 { 254 {
255 lock(contents) while (contents.Remove(sequence)) 255 lock (contents) while (contents.Remove(sequence))
256 ; 256 ;
257 } 257 }
258 258
259 public bool Contains(uint sequence) 259 public bool Contains(uint sequence)
260 { 260 {
261 lock(contents) return contents.Contains(sequence); 261 lock (contents) return contents.Contains(sequence);
262 } 262 }
263 263
264 public void Flush() 264 public void Flush()
@@ -318,7 +318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
318 TextureOutgoingPacketQueue.Clear(); 318 TextureOutgoingPacketQueue.Clear();
319 AssetOutgoingPacketQueue.Clear(); 319 AssetOutgoingPacketQueue.Clear();
320 SendQueue.Clear(); 320 SendQueue.Clear();
321 lock(contents) contents.Clear(); 321 lock (contents) contents.Clear();
322 } 322 }
323 } 323 }
324 324
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index f6da1e4..3067d75 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Communications.OGS1
395 return regionInfo; 395 return regionInfo;
396 } 396 }
397 397
398 if((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo))) 398 if ((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)))
399 { 399 {
400 try 400 try
401 { 401 {
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
index 28e0382..bfe2a71 100644
--- a/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/IPBan/IPBanModule.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.IO; 30using System.IO;
4using System.Text; 31using System.Text;
@@ -19,11 +46,11 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
19 { 46 {
20 new SceneBanner(scene, m_bans); 47 new SceneBanner(scene, m_bans);
21 48
22 lock(m_bans) 49 lock (m_bans)
23 { 50 {
24 foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans) 51 foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans)
25 { 52 {
26 if(!String.IsNullOrEmpty(ban.BannedHostIPMask)) 53 if (!String.IsNullOrEmpty(ban.BannedHostIPMask))
27 m_bans.Add(ban.BannedHostIPMask); 54 m_bans.Add(ban.BannedHostIPMask);
28 if (!String.IsNullOrEmpty(ban.BannedHostNameMask)) 55 if (!String.IsNullOrEmpty(ban.BannedHostNameMask))
29 m_bans.Add(ban.BannedHostNameMask); 56 m_bans.Add(ban.BannedHostNameMask);
@@ -33,7 +60,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
33 60
34 public void PostInitialise() 61 public void PostInitialise()
35 { 62 {
36 if(File.Exists("bans.txt")) 63 if (File.Exists("bans.txt"))
37 { 64 {
38 string[] bans = File.ReadAllLines("bans.txt"); 65 string[] bans = File.ReadAllLines("bans.txt");
39 foreach (string ban in bans) 66 foreach (string ban in bans)
diff --git a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs
index a5e9963..dbfcfee 100644
--- a/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs
+++ b/OpenSim/Region/CoreModules/Agent/IPBan/SceneBanner.cs
@@ -1,4 +1,31 @@
1using System.Collections.Generic; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections.Generic;
2using System.Net; 29using System.Net;
3using OpenSim.Framework.Client; 30using OpenSim.Framework.Client;
4using OpenSim.Region.Framework.Scenes; 31using OpenSim.Region.Framework.Scenes;
@@ -23,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
23 void EventManager_OnClientConnect(IClientCore client) 50 void EventManager_OnClientConnect(IClientCore client)
24 { 51 {
25 IClientIPEndpoint ipEndpoint; 52 IClientIPEndpoint ipEndpoint;
26 if(client.TryGet(out ipEndpoint)) 53 if (client.TryGet(out ipEndpoint))
27 { 54 {
28 IPAddress end = ipEndpoint.EndPoint; 55 IPAddress end = ipEndpoint.EndPoint;
29 56
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index e808cb2..a3bcd5f 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -183,11 +183,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
183 183
184 public void ScriptRemoved(UUID itemID) 184 public void ScriptRemoved(UUID itemID)
185 { 185 {
186 lock(m_UrlMap) 186 lock (m_UrlMap)
187 { 187 {
188 List<string> removeURLs = new List<string>(); 188 List<string> removeURLs = new List<string>();
189 189
190 foreach(KeyValuePair<string, UrlData> url in m_UrlMap) 190 foreach (KeyValuePair<string, UrlData> url in m_UrlMap)
191 { 191 {
192 if (url.Value.itemID == itemID) 192 if (url.Value.itemID == itemID)
193 { 193 {
@@ -205,11 +205,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
205 205
206 public void ObjectRemoved(UUID objectID) 206 public void ObjectRemoved(UUID objectID)
207 { 207 {
208 lock(m_UrlMap) 208 lock (m_UrlMap)
209 { 209 {
210 List<string> removeURLs = new List<string>(); 210 List<string> removeURLs = new List<string>();
211 211
212 foreach(KeyValuePair<string, UrlData> url in m_UrlMap) 212 foreach (KeyValuePair<string, UrlData> url in m_UrlMap)
213 { 213 {
214 if (url.Value.hostID == objectID) 214 if (url.Value.hostID == objectID)
215 { 215 {
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
index 0ededca..be71f6b 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs
@@ -75,7 +75,7 @@ namespace OpenSim.Server.Handlers.Asset
75 httpResponse.StatusCode = (int)HttpStatusCode.OK; 75 httpResponse.StatusCode = (int)HttpStatusCode.OK;
76 httpResponse.ContentType = "application/octet-stream"; 76 httpResponse.ContentType = "application/octet-stream";
77 } 77 }
78 else if(p.Length > 1 && p[1] == "metadata") 78 else if (p.Length > 1 && p[1] == "metadata")
79 { 79 {
80 AssetMetadata metadata = m_AssetService.GetMetadata(p[0]); 80 AssetMetadata metadata = m_AssetService.GetMetadata(p[0]);
81 81
diff --git a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
index b284abc..cfefd38 100644
--- a/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
+++ b/OpenSim/Tests/Common/Mock/BaseAssetRepository.cs
@@ -1,3 +1,30 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
1using System.Collections.Generic; 28using System.Collections.Generic;
2using OpenMetaverse; 29using OpenMetaverse;
3using OpenSim.Framework; 30using OpenSim.Framework;
diff --git a/OpenSim/Tests/Common/Mock/TestAssetCache.cs b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
index a9949bb..66886d0 100644
--- a/OpenSim/Tests/Common/Mock/TestAssetCache.cs
+++ b/OpenSim/Tests/Common/Mock/TestAssetCache.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using OpenMetaverse; 31using OpenMetaverse;
diff --git a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
index 59d4000..581985a 100644
--- a/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
+++ b/OpenSim/Tests/Common/Mock/TestOSHttpResponse.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using OpenSim.Framework.Servers.HttpServer; 31using OpenSim.Framework.Servers.HttpServer;
diff --git a/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs b/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs
index 65c66b0..e858371 100644
--- a/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs
+++ b/OpenSim/Tests/Common/Setup/BaseRequestHandlerTestHelper.cs
@@ -1,3 +1,30 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
1using System; 28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
diff --git a/OpenSim/Tests/Common/Setup/GetAssetStreamHandlerTestHelpers.cs b/OpenSim/Tests/Common/Setup/GetAssetStreamHandlerTestHelpers.cs
index 26851d6..5fc3547 100644
--- a/OpenSim/Tests/Common/Setup/GetAssetStreamHandlerTestHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/GetAssetStreamHandlerTestHelpers.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.IO; 30using System.IO;
4using System.Net; 31using System.Net;
diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs
index 8548aed..b84993e 100644
--- a/OpenSim/Tools/pCampBot/PhysicsBot.cs
+++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs
@@ -191,9 +191,9 @@ namespace pCampBot
191 public void SaveDefaultAppearance() 191 public void SaveDefaultAppearance()
192 { 192 {
193 saveDir = "MyAppearance/" + firstname + "_" + lastname; 193 saveDir = "MyAppearance/" + firstname + "_" + lastname;
194 if (!Directory.Exists(saveDir)) 194 if (!Directory.Exists(saveDir))
195 { 195 {
196 Directory.CreateDirectory(saveDir); 196 Directory.CreateDirectory(saveDir);
197 } 197 }
198 198
199 Array wtypes = Enum.GetValues(typeof(WearableType)); 199 Array wtypes = Enum.GetValues(typeof(WearableType));
@@ -212,7 +212,7 @@ namespace pCampBot
212 { 212 {
213 if (asset != null) 213 if (asset != null)
214 { 214 {
215 try 215 try
216 { 216 {
217 if (asset.Decode()) 217 if (asset.Decode())
218 { 218 {
@@ -220,14 +220,14 @@ namespace pCampBot
220 asset.AssetType.ToString().ToLower(), 220 asset.AssetType.ToString().ToLower(),
221 asset.WearableType)), asset.AssetData); 221 asset.WearableType)), asset.AssetData);
222 } 222 }
223 else 223 else
224 { 224 {
225 MainConsole.Instance.Error(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID)); 225 MainConsole.Instance.Error(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID));
226 } 226 }
227 } 227 }
228 catch (Exception e) 228 catch (Exception e)
229 { 229 {
230 MainConsole.Instance.Error(String.Format("Exception: {0}",e.ToString())); 230 MainConsole.Instance.Error(String.Format("Exception: {0}",e.ToString()));
231 } 231 }
232 } 232 }
233 } 233 }
@@ -235,7 +235,7 @@ namespace pCampBot
235 public WearableType GetWearableType(string path) 235 public WearableType GetWearableType(string path)
236 { 236 {
237 string type = ((((path.Split('/'))[2]).Split('.'))[0]).Trim(); 237 string type = ((((path.Split('/'))[2]).Split('.'))[0]).Trim();
238 switch(type) 238 switch (type)
239 { 239 {
240 case "Eyes": 240 case "Eyes":
241 return WearableType.Eyes; 241 return WearableType.Eyes;
@@ -256,7 +256,7 @@ namespace pCampBot
256 256
257 public void MakeDefaultAppearance(string wear) 257 public void MakeDefaultAppearance(string wear)
258 { 258 {
259 try 259 try
260 { 260 {
261 if (wear == "yes") 261 if (wear == "yes")
262 { 262 {
@@ -267,54 +267,54 @@ namespace pCampBot
267 saveDir = "MyAppearance/" + wear; 267 saveDir = "MyAppearance/" + wear;
268 saveDir = saveDir + "/"; 268 saveDir = saveDir + "/";
269 269
270 string[] clothing = Directory.GetFiles(saveDir, "*.clothing", SearchOption.TopDirectoryOnly); 270 string[] clothing = Directory.GetFiles(saveDir, "*.clothing", SearchOption.TopDirectoryOnly);
271 string[] bodyparts = Directory.GetFiles(saveDir, "*.bodypart", SearchOption.TopDirectoryOnly); 271 string[] bodyparts = Directory.GetFiles(saveDir, "*.bodypart", SearchOption.TopDirectoryOnly);
272 InventoryFolder clothfolder = FindClothingFolder(); 272 InventoryFolder clothfolder = FindClothingFolder();
273 UUID transid = UUID.Random(); 273 UUID transid = UUID.Random();
274 List<InventoryBase> listwearables = new List<InventoryBase>(); 274 List<InventoryBase> listwearables = new List<InventoryBase>();
275 275
276 for (int i = 0; i < clothing.Length; i++) 276 for (int i = 0; i < clothing.Length; i++)
277 { 277 {
278 UUID assetID = UUID.Random(); 278 UUID assetID = UUID.Random();
279 AssetClothing asset = new AssetClothing(assetID, File.ReadAllBytes(clothing[i])); 279 AssetClothing asset = new AssetClothing(assetID, File.ReadAllBytes(clothing[i]));
280 asset.Decode(); 280 asset.Decode();
281 asset.Owner = client.Self.AgentID; 281 asset.Owner = client.Self.AgentID;
282 asset.WearableType = GetWearableType(clothing[i]); 282 asset.WearableType = GetWearableType(clothing[i]);
283 asset.Encode(); 283 asset.Encode();
284 transid = client.Assets.RequestUpload(asset,true); 284 transid = client.Assets.RequestUpload(asset,true);
285 client.Inventory.RequestCreateItem(clothfolder.UUID, "MyClothing" + i.ToString(), "MyClothing", AssetType.Clothing, 285 client.Inventory.RequestCreateItem(clothfolder.UUID, "MyClothing" + i.ToString(), "MyClothing", AssetType.Clothing,
286 transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item) 286 transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
287 { 287 {
288 if (success) 288 if (success)
289 { 289 {
290 listwearables.Add(item); 290 listwearables.Add(item);
291 } 291 }
292 else 292 else
293 MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name)); 293 MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
294 } 294 }
295 ); 295 );
296 } 296 }
297 297
298 for (int i = 0; i < bodyparts.Length; i++) 298 for (int i = 0; i < bodyparts.Length; i++)
299 { 299 {
300 UUID assetID = UUID.Random(); 300 UUID assetID = UUID.Random();
301 AssetBodypart asset = new AssetBodypart(assetID, File.ReadAllBytes(bodyparts[i])); 301 AssetBodypart asset = new AssetBodypart(assetID, File.ReadAllBytes(bodyparts[i]));
302 asset.Decode(); 302 asset.Decode();
303 asset.Owner = client.Self.AgentID; 303 asset.Owner = client.Self.AgentID;
304 asset.WearableType = GetWearableType(bodyparts[i]); 304 asset.WearableType = GetWearableType(bodyparts[i]);
305 asset.Encode(); 305 asset.Encode();
306 transid = client.Assets.RequestUpload(asset,true); 306 transid = client.Assets.RequestUpload(asset,true);
307 client.Inventory.RequestCreateItem(clothfolder.UUID, "MyBodyPart" + i.ToString(), "MyBodyPart", AssetType.Bodypart, 307 client.Inventory.RequestCreateItem(clothfolder.UUID, "MyBodyPart" + i.ToString(), "MyBodyPart", AssetType.Bodypart,
308 transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item) 308 transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
309 { 309 {
310 if (success) 310 if (success)
311 { 311 {
312 listwearables.Add(item); 312 listwearables.Add(item);
313 } 313 }
314 else 314 else
315 MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name)); 315 MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
316 } 316 }
317 ); 317 );
318 } 318 }
319 319
320 Thread.Sleep(1000); 320 Thread.Sleep(1000);
@@ -326,10 +326,10 @@ namespace pCampBot
326 MainConsole.Instance.Notice(String.Format("Sending {0} wearables...",listwearables.Count)); 326 MainConsole.Instance.Notice(String.Format("Sending {0} wearables...",listwearables.Count));
327 client.Appearance.WearOutfit(listwearables, false); 327 client.Appearance.WearOutfit(listwearables, false);
328 } 328 }
329 } 329 }
330 catch (Exception ex) 330 catch (Exception ex)
331 { 331 {
332 Console.WriteLine(ex.ToString()); 332 Console.WriteLine(ex.ToString());
333 } 333 }
334 } 334 }
335 335