Add copyright headers, formatting cleanup.
parent
ecfad4944b
commit
e0bc5c5db2
|
@ -1191,7 +1191,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
if (requestData.Contains("gender"))
|
if (requestData.Contains("gender"))
|
||||||
{
|
{
|
||||||
switch((string)requestData["gender"])
|
switch ((string)requestData["gender"])
|
||||||
{
|
{
|
||||||
case "m" :
|
case "m" :
|
||||||
model = dmale;
|
model = dmale;
|
||||||
|
@ -1215,7 +1215,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
// No appearance attributes were set
|
// No appearance attributes were set
|
||||||
|
|
||||||
if(model == String.Empty)
|
if (model == String.Empty)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[RADMIN] Appearance update not requested");
|
m_log.DebugFormat("[RADMIN] Appearance update not requested");
|
||||||
return;
|
return;
|
||||||
|
@ -1430,7 +1430,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
// Load up any included assets. Duplicates will be ignored
|
// Load up any included assets. Duplicates will be ignored
|
||||||
assets = doc.GetElementsByTagName("RequiredAsset");
|
assets = doc.GetElementsByTagName("RequiredAsset");
|
||||||
foreach(XmlNode asset in assets)
|
foreach (XmlNode asset in assets)
|
||||||
{
|
{
|
||||||
AssetBase rass = new AssetBase();
|
AssetBase rass = new AssetBase();
|
||||||
rass.FullID = UUID.Random();
|
rass.FullID = UUID.Random();
|
||||||
|
@ -1851,7 +1851,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
|
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
|
||||||
archiver.ArchiveRegion(filename);
|
archiver.ArchiveRegion(filename);
|
||||||
lock(SOLock) Monitor.Wait(SOLock,5000);
|
lock (SOLock) Monitor.Wait(SOLock,5000);
|
||||||
scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
|
scene.EventManager.OnOarFileSaved -= RemoteAdminOarSaveCompleted;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1881,7 +1881,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
|
private void RemoteAdminOarSaveCompleted(Guid uuid, string name)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[RADMIN] File processing complete for {0}", name);
|
m_log.DebugFormat("[RADMIN] File processing complete for {0}", name);
|
||||||
lock(SOLock) Monitor.Pulse(SOLock);
|
lock (SOLock) Monitor.Pulse(SOLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request)
|
public XmlRpcResponse XmlRpcLoadXMLMethod(XmlRpcRequest request)
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -488,16 +488,16 @@ namespace OpenSim.Framework.Servers
|
||||||
}
|
}
|
||||||
|
|
||||||
public string StatReport(OSHttpRequest httpRequest)
|
public string StatReport(OSHttpRequest httpRequest)
|
||||||
{
|
{
|
||||||
// If we catch a request for "callback", wrap the response in the value for jsonp
|
// If we catch a request for "callback", wrap the response in the value for jsonp
|
||||||
if( httpRequest.Query.ContainsKey("callback"))
|
if ( httpRequest.Query.ContainsKey("callback"))
|
||||||
{
|
{
|
||||||
return httpRequest.Query["callback"].ToString() + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");";
|
return httpRequest.Query["callback"].ToString() + "(" + m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version ) + ");";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version );
|
return m_stats.XReport((DateTime.Now - m_startuptime).ToString() , m_version );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void RemovePIDFile()
|
protected void RemovePIDFile()
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
|
|
||||||
protected bool CheckParam(string path)
|
protected bool CheckParam(string path)
|
||||||
{
|
{
|
||||||
if(String.IsNullOrEmpty(path))
|
if (String.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -10708,7 +10708,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if(m_userEndPoint is IPEndPoint)
|
if (m_userEndPoint is IPEndPoint)
|
||||||
{
|
{
|
||||||
IPEndPoint ep = (IPEndPoint)m_userEndPoint;
|
IPEndPoint ep = (IPEndPoint)m_userEndPoint;
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Sequence != 0)
|
if (item.Sequence != 0)
|
||||||
lock(contents) contents.Add(item.Sequence);
|
lock (contents) contents.Add(item.Sequence);
|
||||||
|
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
|
@ -241,7 +241,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
item.TickCount = System.Environment.TickCount;
|
item.TickCount = System.Environment.TickCount;
|
||||||
if (item.Sequence == 0)
|
if (item.Sequence == 0)
|
||||||
return item;
|
return item;
|
||||||
lock(contents)
|
lock (contents)
|
||||||
{
|
{
|
||||||
if (contents.Contains(item.Sequence))
|
if (contents.Contains(item.Sequence))
|
||||||
if (contents.Remove(item.Sequence))
|
if (contents.Remove(item.Sequence))
|
||||||
|
@ -252,13 +252,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void Cancel(uint sequence)
|
public void Cancel(uint sequence)
|
||||||
{
|
{
|
||||||
lock(contents) while (contents.Remove(sequence))
|
lock (contents) while (contents.Remove(sequence))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Contains(uint sequence)
|
public bool Contains(uint sequence)
|
||||||
{
|
{
|
||||||
lock(contents) return contents.Contains(sequence);
|
lock (contents) return contents.Contains(sequence);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Flush()
|
public void Flush()
|
||||||
|
@ -318,7 +318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
TextureOutgoingPacketQueue.Clear();
|
TextureOutgoingPacketQueue.Clear();
|
||||||
AssetOutgoingPacketQueue.Clear();
|
AssetOutgoingPacketQueue.Clear();
|
||||||
SendQueue.Clear();
|
SendQueue.Clear();
|
||||||
lock(contents) contents.Clear();
|
lock (contents) contents.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return regionInfo;
|
return regionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)))
|
if ((!m_useRemoteRegionCache) || (!m_remoteRegionInfoCache.TryGetValue(regionHandle, out regionInfo)))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -19,11 +46,11 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
{
|
{
|
||||||
new SceneBanner(scene, m_bans);
|
new SceneBanner(scene, m_bans);
|
||||||
|
|
||||||
lock(m_bans)
|
lock (m_bans)
|
||||||
{
|
{
|
||||||
foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans)
|
foreach (EstateBan ban in scene.RegionInfo.EstateSettings.EstateBans)
|
||||||
{
|
{
|
||||||
if(!String.IsNullOrEmpty(ban.BannedHostIPMask))
|
if (!String.IsNullOrEmpty(ban.BannedHostIPMask))
|
||||||
m_bans.Add(ban.BannedHostIPMask);
|
m_bans.Add(ban.BannedHostIPMask);
|
||||||
if (!String.IsNullOrEmpty(ban.BannedHostNameMask))
|
if (!String.IsNullOrEmpty(ban.BannedHostNameMask))
|
||||||
m_bans.Add(ban.BannedHostNameMask);
|
m_bans.Add(ban.BannedHostNameMask);
|
||||||
|
@ -33,7 +60,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
if(File.Exists("bans.txt"))
|
if (File.Exists("bans.txt"))
|
||||||
{
|
{
|
||||||
string[] bans = File.ReadAllLines("bans.txt");
|
string[] bans = File.ReadAllLines("bans.txt");
|
||||||
foreach (string ban in bans)
|
foreach (string ban in bans)
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System.Collections.Generic;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using OpenSim.Framework.Client;
|
using OpenSim.Framework.Client;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
@ -23,7 +50,7 @@ namespace OpenSim.Region.CoreModules.Agent.IPBan
|
||||||
void EventManager_OnClientConnect(IClientCore client)
|
void EventManager_OnClientConnect(IClientCore client)
|
||||||
{
|
{
|
||||||
IClientIPEndpoint ipEndpoint;
|
IClientIPEndpoint ipEndpoint;
|
||||||
if(client.TryGet(out ipEndpoint))
|
if (client.TryGet(out ipEndpoint))
|
||||||
{
|
{
|
||||||
IPAddress end = ipEndpoint.EndPoint;
|
IPAddress end = ipEndpoint.EndPoint;
|
||||||
|
|
||||||
|
|
|
@ -183,11 +183,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
public void ScriptRemoved(UUID itemID)
|
public void ScriptRemoved(UUID itemID)
|
||||||
{
|
{
|
||||||
lock(m_UrlMap)
|
lock (m_UrlMap)
|
||||||
{
|
{
|
||||||
List<string> removeURLs = new List<string>();
|
List<string> removeURLs = new List<string>();
|
||||||
|
|
||||||
foreach(KeyValuePair<string, UrlData> url in m_UrlMap)
|
foreach (KeyValuePair<string, UrlData> url in m_UrlMap)
|
||||||
{
|
{
|
||||||
if (url.Value.itemID == itemID)
|
if (url.Value.itemID == itemID)
|
||||||
{
|
{
|
||||||
|
@ -205,11 +205,11 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
public void ObjectRemoved(UUID objectID)
|
public void ObjectRemoved(UUID objectID)
|
||||||
{
|
{
|
||||||
lock(m_UrlMap)
|
lock (m_UrlMap)
|
||||||
{
|
{
|
||||||
List<string> removeURLs = new List<string>();
|
List<string> removeURLs = new List<string>();
|
||||||
|
|
||||||
foreach(KeyValuePair<string, UrlData> url in m_UrlMap)
|
foreach (KeyValuePair<string, UrlData> url in m_UrlMap)
|
||||||
{
|
{
|
||||||
if (url.Value.hostID == objectID)
|
if (url.Value.hostID == objectID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
httpResponse.StatusCode = (int)HttpStatusCode.OK;
|
httpResponse.StatusCode = (int)HttpStatusCode.OK;
|
||||||
httpResponse.ContentType = "application/octet-stream";
|
httpResponse.ContentType = "application/octet-stream";
|
||||||
}
|
}
|
||||||
else if(p.Length > 1 && p[1] == "metadata")
|
else if (p.Length > 1 && p[1] == "metadata")
|
||||||
{
|
{
|
||||||
AssetMetadata metadata = m_AssetService.GetMetadata(p[0]);
|
AssetMetadata metadata = m_AssetService.GetMetadata(p[0]);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
|
|
|
@ -1,3 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
@ -1,4 +1,31 @@
|
||||||
using System;
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
|
@ -191,9 +191,9 @@ namespace pCampBot
|
||||||
public void SaveDefaultAppearance()
|
public void SaveDefaultAppearance()
|
||||||
{
|
{
|
||||||
saveDir = "MyAppearance/" + firstname + "_" + lastname;
|
saveDir = "MyAppearance/" + firstname + "_" + lastname;
|
||||||
if (!Directory.Exists(saveDir))
|
if (!Directory.Exists(saveDir))
|
||||||
{
|
{
|
||||||
Directory.CreateDirectory(saveDir);
|
Directory.CreateDirectory(saveDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
Array wtypes = Enum.GetValues(typeof(WearableType));
|
Array wtypes = Enum.GetValues(typeof(WearableType));
|
||||||
|
@ -212,7 +212,7 @@ namespace pCampBot
|
||||||
{
|
{
|
||||||
if (asset != null)
|
if (asset != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (asset.Decode())
|
if (asset.Decode())
|
||||||
{
|
{
|
||||||
|
@ -220,14 +220,14 @@ namespace pCampBot
|
||||||
asset.AssetType.ToString().ToLower(),
|
asset.AssetType.ToString().ToLower(),
|
||||||
asset.WearableType)), asset.AssetData);
|
asset.WearableType)), asset.AssetData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Error(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID));
|
MainConsole.Instance.Error(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MainConsole.Instance.Error(String.Format("Exception: {0}",e.ToString()));
|
MainConsole.Instance.Error(String.Format("Exception: {0}",e.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ namespace pCampBot
|
||||||
public WearableType GetWearableType(string path)
|
public WearableType GetWearableType(string path)
|
||||||
{
|
{
|
||||||
string type = ((((path.Split('/'))[2]).Split('.'))[0]).Trim();
|
string type = ((((path.Split('/'))[2]).Split('.'))[0]).Trim();
|
||||||
switch(type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "Eyes":
|
case "Eyes":
|
||||||
return WearableType.Eyes;
|
return WearableType.Eyes;
|
||||||
|
@ -256,7 +256,7 @@ namespace pCampBot
|
||||||
|
|
||||||
public void MakeDefaultAppearance(string wear)
|
public void MakeDefaultAppearance(string wear)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (wear == "yes")
|
if (wear == "yes")
|
||||||
{
|
{
|
||||||
|
@ -267,54 +267,54 @@ namespace pCampBot
|
||||||
saveDir = "MyAppearance/" + wear;
|
saveDir = "MyAppearance/" + wear;
|
||||||
saveDir = saveDir + "/";
|
saveDir = saveDir + "/";
|
||||||
|
|
||||||
string[] clothing = Directory.GetFiles(saveDir, "*.clothing", SearchOption.TopDirectoryOnly);
|
string[] clothing = Directory.GetFiles(saveDir, "*.clothing", SearchOption.TopDirectoryOnly);
|
||||||
string[] bodyparts = Directory.GetFiles(saveDir, "*.bodypart", SearchOption.TopDirectoryOnly);
|
string[] bodyparts = Directory.GetFiles(saveDir, "*.bodypart", SearchOption.TopDirectoryOnly);
|
||||||
InventoryFolder clothfolder = FindClothingFolder();
|
InventoryFolder clothfolder = FindClothingFolder();
|
||||||
UUID transid = UUID.Random();
|
UUID transid = UUID.Random();
|
||||||
List<InventoryBase> listwearables = new List<InventoryBase>();
|
List<InventoryBase> listwearables = new List<InventoryBase>();
|
||||||
|
|
||||||
for (int i = 0; i < clothing.Length; i++)
|
for (int i = 0; i < clothing.Length; i++)
|
||||||
{
|
{
|
||||||
UUID assetID = UUID.Random();
|
UUID assetID = UUID.Random();
|
||||||
AssetClothing asset = new AssetClothing(assetID, File.ReadAllBytes(clothing[i]));
|
AssetClothing asset = new AssetClothing(assetID, File.ReadAllBytes(clothing[i]));
|
||||||
asset.Decode();
|
asset.Decode();
|
||||||
asset.Owner = client.Self.AgentID;
|
asset.Owner = client.Self.AgentID;
|
||||||
asset.WearableType = GetWearableType(clothing[i]);
|
asset.WearableType = GetWearableType(clothing[i]);
|
||||||
asset.Encode();
|
asset.Encode();
|
||||||
transid = client.Assets.RequestUpload(asset,true);
|
transid = client.Assets.RequestUpload(asset,true);
|
||||||
client.Inventory.RequestCreateItem(clothfolder.UUID, "MyClothing" + i.ToString(), "MyClothing", AssetType.Clothing,
|
client.Inventory.RequestCreateItem(clothfolder.UUID, "MyClothing" + i.ToString(), "MyClothing", AssetType.Clothing,
|
||||||
transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
|
transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
|
||||||
{
|
{
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
listwearables.Add(item);
|
listwearables.Add(item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
|
MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < bodyparts.Length; i++)
|
for (int i = 0; i < bodyparts.Length; i++)
|
||||||
{
|
{
|
||||||
UUID assetID = UUID.Random();
|
UUID assetID = UUID.Random();
|
||||||
AssetBodypart asset = new AssetBodypart(assetID, File.ReadAllBytes(bodyparts[i]));
|
AssetBodypart asset = new AssetBodypart(assetID, File.ReadAllBytes(bodyparts[i]));
|
||||||
asset.Decode();
|
asset.Decode();
|
||||||
asset.Owner = client.Self.AgentID;
|
asset.Owner = client.Self.AgentID;
|
||||||
asset.WearableType = GetWearableType(bodyparts[i]);
|
asset.WearableType = GetWearableType(bodyparts[i]);
|
||||||
asset.Encode();
|
asset.Encode();
|
||||||
transid = client.Assets.RequestUpload(asset,true);
|
transid = client.Assets.RequestUpload(asset,true);
|
||||||
client.Inventory.RequestCreateItem(clothfolder.UUID, "MyBodyPart" + i.ToString(), "MyBodyPart", AssetType.Bodypart,
|
client.Inventory.RequestCreateItem(clothfolder.UUID, "MyBodyPart" + i.ToString(), "MyBodyPart", AssetType.Bodypart,
|
||||||
transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
|
transid, InventoryType.Wearable, asset.WearableType, PermissionMask.All, delegate(bool success, InventoryItem item)
|
||||||
{
|
{
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
listwearables.Add(item);
|
listwearables.Add(item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
|
MainConsole.Instance.Error(String.Format("Failed to create item {0}",item.Name));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Thread.Sleep(1000);
|
Thread.Sleep(1000);
|
||||||
|
@ -326,10 +326,10 @@ namespace pCampBot
|
||||||
MainConsole.Instance.Notice(String.Format("Sending {0} wearables...",listwearables.Count));
|
MainConsole.Instance.Notice(String.Format("Sending {0} wearables...",listwearables.Count));
|
||||||
client.Appearance.WearOutfit(listwearables, false);
|
client.Appearance.WearOutfit(listwearables, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex.ToString());
|
Console.WriteLine(ex.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue