From 3ae3cd0a5b7b5fd07c5733c472253506f055a3e7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 27 Nov 2009 08:16:47 +0000 Subject: Make llDie virtual, since it's functionality is engine specific --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5de23ad..f5cda2c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -1037,7 +1037,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return detectedParams.TouchUV; } - public void llDie() + public virtual void llDie() { m_host.AddScriptLPS(1); throw new SelfDeleteException(); -- cgit v1.1 From b9eb244d6db8d5196a46c4085e5029370d3a0853 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 27 Nov 2009 08:58:26 +0000 Subject: Reset update flag when a SOG is deleted. This fixes llDie(); --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6ec2a01..7359011 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1199,6 +1199,7 @@ namespace OpenSim.Region.Framework.Scenes if (!silent) { + part.UpdateFlag = 0; if (part == m_rootPart) avatars[i].ControllingClient.SendKillObject(m_regionHandle, part.LocalId); } -- cgit v1.1 From 1f71523a5ad4e21986d20a3012638991ea0d9e9c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 14:47:49 +0000 Subject: minor: make irc bridge logging less verbose if it isn't actually enabled --- OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs index 70e80bc..e664b44 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs @@ -69,13 +69,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat m_config = config.Configs["IRC"]; if (m_config == null) { - m_log.InfoFormat("[IRC-Bridge] module not configured"); +// m_log.InfoFormat("[IRC-Bridge] module not configured"); return; } if (!m_config.GetBoolean("enabled", false)) { - m_log.InfoFormat("[IRC-Bridge] module disabled in configuration"); +// m_log.InfoFormat("[IRC-Bridge] module disabled in configuration"); return; } @@ -85,6 +85,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } m_pluginEnabled = true; + m_log.InfoFormat("[IRC-Bridge]: Module enabled"); } public void AddRegion(Scene scene) @@ -143,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat public static XmlRpcResponse XmlRpcAdminMethod(XmlRpcRequest request, IPEndPoint remoteClient) { - m_log.Info("[IRC-Bridge]: XML RPC Admin Entry"); + m_log.Debug("[IRC-Bridge]: XML RPC Admin Entry"); XmlRpcResponse response = new XmlRpcResponse(); Hashtable responseData = new Hashtable(); @@ -188,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } catch (Exception e) { - m_log.InfoFormat("[IRC-Bridge] XML RPC Admin request failed : {0}", e.Message); + m_log.ErrorFormat("[IRC-Bridge] XML RPC Admin request failed : {0}", e.Message); responseData["success"] = "false"; responseData["error"] = e.Message; -- cgit v1.1 From 32ef1b9e239e027dbf5608fb25003a54d3b8eda0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 15:10:12 +0000 Subject: remove stringent content type checking to make it easier to load oars directly from urls --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 34b81d8..af72968 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver /// /// Resolve path to a working FileStream /// + /// + /// private Stream GetStream(string path) { if (File.Exists(path)) @@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver WebResponse response = request.GetResponse(); Stream file = response.GetResponseStream(); - if (response.ContentType != "application/x-oar") - throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); + // justincc: gonna ignore the content type for now and just try anything + //if (response.ContentType != "application/x-oar") + // throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString())); if (response.ContentLength == 0) throw new Exception(String.Format("{0} returned an empty file", uri.ToString())); -- cgit v1.1 From 25e2b16451ed68aee4c82ca48f69cb7e0f58cd4e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 17:52:23 +0000 Subject: Apply patch to stop failure of llParcelMediaCommandList() on group deeded land See http://opensimulator.org/mantis/view.php?id=3999 --- .../CoreModules/World/Permissions/PermissionsModule.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 013a0ef..c9b3071 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -800,30 +800,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions } protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers) - { - bool permission = false; - + { if (parcel.LandData.OwnerID == user) { - permission = true; + // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on + // the subsequent redundant checks when using lParcelMediaCommandList() + // See http://opensimulator.org/mantis/view.php?id=3999 for more details + return true; } if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers)) { - permission = true; + return true; } if (IsEstateManager(user)) { - permission = true; + return true; } if (IsAdministrator(user)) { - permission = true; + return true; } - return permission; + return false; } protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers) -- cgit v1.1 From 251fd8c948a141fe898f0df025c2be764d39d4d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 18:24:21 +0000 Subject: Apply patch to reduce git revision text length if running sim directly from a git tree See http://opensimulator.org/mantis/view.php?id=4030 Thanks ChrisDown (and Bruce for reporting) --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 0d93ff7..655df9d 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -442,7 +442,7 @@ namespace OpenSim.Framework.Servers if (File.Exists(gitCommitFileName)) { StreamReader CommitFile = File.OpenText(gitCommitFileName); - buildVersion = Environment.NewLine + "git# " + CommitFile.ReadLine(); + buildVersion = CommitFile.ReadLine(); CommitFile.Close(); m_version += buildVersion ?? ""; } -- cgit v1.1 From 0f745e928fd08bac7233c1e76c29c1154f9e7b8f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 18:52:20 +0000 Subject: Apply patch that fixes the failing T013_eStateSettingsRandomStorage test See http://opensimulator.org/mantis/view.php?id=3993 Thanks Kunnis --- OpenSim/Data/Tests/BasicEstateTest.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Data/Tests/BasicEstateTest.cs b/OpenSim/Data/Tests/BasicEstateTest.cs index d8e1725..907bb38 100644 --- a/OpenSim/Data/Tests/BasicEstateTest.cs +++ b/OpenSim/Data/Tests/BasicEstateTest.cs @@ -154,13 +154,14 @@ namespace OpenSim.Data.Tests ); } - //[Test] - // Currently fails occasionally + [Test] public void T012_EstateSettingsRandomStorage() { // Letting estate store generate rows to database for us EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID); - new PropertyScrambler().Scramble(originalSettings); + new PropertyScrambler() + .DontScramble(x=>x.EstateID) + .Scramble(originalSettings); // Saving settings. db.StoreEstateSettings(originalSettings); -- cgit v1.1 From 2e47e5147547d355d8935404c43fbe1b61888ee1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:01:45 +0000 Subject: Make locking of timers and listeners in script related functions consistent See http://opensimulator.org/mantis/view.php?id=4316 Thanks KittyLiu! --- .../Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 9 ++++++--- .../ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index d4a28e2..60df2e7 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -602,9 +602,12 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm ListenerInfo info = ListenerInfo.FromData(localID, itemID, hostID, item); - if (!m_listeners.ContainsKey((int)item[2])) - m_listeners.Add((int)item[2], new List()); - m_listeners[(int)item[2]].Add(info); + lock (m_listeners) + { + if (!m_listeners.ContainsKey((int)item[2])) + m_listeners.Add((int)item[2], new List()); + m_listeners[(int)item[2]].Add(info); + } idx+=6; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 0716d45..eeb59d9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs @@ -166,7 +166,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins ts.next = DateTime.Now.Ticks + (long)data[idx+1]; idx += 2; - Timers.Add(MakeTimerKey(localID,itemID), ts); + lock (TimerListLock) + { + Timers.Add(MakeTimerKey(localID, itemID), ts); + } } } } -- cgit v1.1 From eaa424778b7902281084bcc36c05d201395b99b3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:02:48 +0000 Subject: minor: add KittyLiu to CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8744a08..7101d28 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -86,6 +86,7 @@ what it is today. * Kevin Cozens * kinoc (Daxtron Labs) * Kitto Flora +* KittyLiu * Kurt Taylor (IBM) * lulurun * M.Igarashi -- cgit v1.1 From e078fb2e713fd20c811bd8a12a914042fdf062ee Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:23:51 +0000 Subject: Implement god mode user freezing and unfreezing See http://opensimulator.org/mantis/view.php?id=4356 Thanks Revolution I performed a subsequent probable bug fix in this patch --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 2 +- .../Region/CoreModules/Avatar/Gods/GodsModule.cs | 71 ++++++++++++++-------- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 4221212..c2aa8e2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -13610,7 +13610,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerGodKickUser != null) { handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, - gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); + gkupack.UserInfo.AgentID, gkupack.UserInfo.KickFlags, gkupack.UserInfo.Reason,gkupack.UserInfo); } } else diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 273c128..7e1bed5 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods /// The person doing the kicking /// The session of the person doing the kicking /// the person that is being kicked - /// This isn't used apparently + /// Tells what to do to the user /// The message to send to the user after it's been turned into a field public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason) { @@ -110,39 +110,56 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods { if (m_scene.Permissions.IsGod(godID)) { - if (agentID == kickUserID) + if (kickflags == 0) { - string reasonStr = Utils.BytesToString(reason); + if (agentID == kickUserID) + { + string reasonStr = Utils.BytesToString(reason); - m_scene.ForEachClient( - delegate(IClientAPI controller) - { - if (controller.AgentId != godID) - controller.Kick(reasonStr); - } - ); + m_scene.ForEachClient( + delegate(IClientAPI controller) + { + if (controller.AgentId != godID) + controller.Kick(reasonStr); + } + ); - // This is a bit crude. It seems the client will be null before it actually stops the thread - // The thread will kill itself eventually :/ - // Is there another way to make sure *all* clients get this 'inter region' message? - m_scene.ForEachScenePresence( - delegate(ScenePresence p) - { - if (p.UUID != godID && !p.IsChildAgent) + // This is a bit crude. It seems the client will be null before it actually stops the thread + // The thread will kill itself eventually :/ + // Is there another way to make sure *all* clients get this 'inter region' message? + m_scene.ForEachScenePresence( + delegate(ScenePresence p) { - // Possibly this should really be p.Close() though that method doesn't send a close - // to the client - p.ControllingClient.Close(); + if (p.UUID != godID && !p.IsChildAgent) + { + // Possibly this should really be p.Close() though that method doesn't send a close + // to the client + p.ControllingClient.Close(); + } } - } - ); + ); + } + else + { + m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent); + + sp.ControllingClient.Kick(Utils.BytesToString(reason)); + sp.ControllingClient.Close(); + } } - else + + if (kickflags == 1) { - m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent); - - sp.ControllingClient.Kick(Utils.BytesToString(reason)); - sp.ControllingClient.Close(); + sp.AllowMovement = false; + m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); + m_dialogModule.SendAlertToUser(godID, "User Frozen"); + } + + if (kickflags == 2) + { + sp.AllowMovement = true; + m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason)); + m_dialogModule.SendAlertToUser(godID, "User Unfrozen"); } } else -- cgit v1.1 From bdba4500eddd31a38311f468e6dd9d6dfd183747 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:27:01 +0000 Subject: minor: Add revolution to CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 7101d28..174ce0a 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -105,6 +105,7 @@ what it is today. * otakup0pe * ralphos * RemedyTomm +* Revolution * Richard Alimi (IBM) * Rick Alther (IBM) * Rob Smart (IBM) -- cgit v1.1 From 55a08969182f1da9755b4a18cce3c955352f2630 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:28:26 +0000 Subject: minor: remove mono compiler warning --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 5584f87..9030a5c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1391,7 +1391,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine if (rootE.GetAttribute("UUID") != itemID.ToString()) return; - string assetID = rootE.GetAttribute("Asset"); +// string assetID = rootE.GetAttribute("Asset"); XmlNodeList stateL = rootE.GetElementsByTagName("ScriptState"); -- cgit v1.1 From e5661e5609421f7e5bc7b79a4c2573a1368a3e53 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:31:19 +0000 Subject: Remove stub Python module and DLLs since this was never fully implemented It may be possible to reintroduce this if someone wants to implement a Python hookup for OpenSim scripting (I'm sure it can't be too hard). Might be possible to import wholesale from modrex See http://opensimulator.org/mantis/view.php?id=4395 Thanks mpallari --- .../OptionalModules/Python/PythonAPI/Console.cs | 48 --------------- .../Region/OptionalModules/Python/PythonModule.cs | 71 ---------------------- prebuild.xml | 2 - 3 files changed, 121 deletions(-) delete mode 100644 OpenSim/Region/OptionalModules/Python/PythonAPI/Console.cs delete mode 100644 OpenSim/Region/OptionalModules/Python/PythonModule.cs diff --git a/OpenSim/Region/OptionalModules/Python/PythonAPI/Console.cs b/OpenSim/Region/OptionalModules/Python/PythonAPI/Console.cs deleted file mode 100644 index a823ff9..0000000 --- a/OpenSim/Region/OptionalModules/Python/PythonAPI/Console.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.Reflection; -using log4net; - -namespace OpenSim.Region.Modules.Python.PythonAPI -{ - class Console - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public void WriteLine(string txt) - { - m_log.Info(txt); - } - - public void WriteLine(string txt, params Object[] e) - { - m_log.Info(String.Format(txt, e)); - } - } -} diff --git a/OpenSim/Region/OptionalModules/Python/PythonModule.cs b/OpenSim/Region/OptionalModules/Python/PythonModule.cs deleted file mode 100644 index ce35363..0000000 --- a/OpenSim/Region/OptionalModules/Python/PythonModule.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.Reflection; -using System.Security.Policy; -using System.Text; -using IronPython.Hosting; -using log4net; -using Nini.Config; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.Modules.Python -{ - class PythonModule : IRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - private PythonEngine m_python; - - public void Initialise(Scene scene, IConfigSource source) - { - } - - public void PostInitialise() - { - m_log.Info("[PYTHON] Initialising IronPython engine."); - m_python = new PythonEngine(); - m_python.AddToPath(System.Environment.CurrentDirectory + System.IO.Path.DirectorySeparatorChar + "Python"); - } - - public void Close() - { - } - - public string Name - { - get { return "PythonModule"; } - } - - public bool IsSharedModule - { - get { return true; } - } - } -} diff --git a/prebuild.xml b/prebuild.xml index ad06938..9d428d1 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1684,8 +1684,6 @@ - - -- cgit v1.1 From 66f511c76aef1332e0988c3e7b32faac37d4d713 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:45:33 +0000 Subject: Remove unused GetDefaultAppearance() static function that is also available on AvatarFactoryModule --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 2558757..fbabb5c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4398,16 +4398,6 @@ namespace OpenSim.Region.Framework.Scenes #endregion - #region Avatar Appearance Default - - public static void GetDefaultAvatarAppearance(out AvatarWearable[] wearables, out byte[] visualParams) - { - visualParams = AvatarAppearance.GetDefaultVisualParams(); - wearables = AvatarWearable.DefaultWearables; - } - - #endregion - public void RegionHandleRequest(IClientAPI client, UUID regionID) { ulong handle = 0; -- cgit v1.1 From 3e4000b9d9c69a032af5ebf76cddb1726aea1994 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Nov 2009 19:56:06 +0000 Subject: Rename TestAssetDataPlugin to MockAssetDataPlugin --- OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs | 64 ++++++++++++++++++++++++ OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs | 64 ------------------------ 2 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs delete mode 100644 OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs diff --git a/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs new file mode 100644 index 0000000..cc1dfbf --- /dev/null +++ b/OpenSim/Tests/Common/Mock/MockAssetDataPlugin.cs @@ -0,0 +1,64 @@ +/* + * 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 OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Data; + +namespace OpenSim.Tests.Common.Mock +{ + /// + /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the + /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit + /// tests are single threaded. + /// + public class MockAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin + { + public string Version { get { return "0"; } } + public string Name { get { return "MockAssetDataPlugin"; } } + + public void Initialise() {} + public void Initialise(string connect) {} + public void Dispose() {} + + private readonly List assets = new List(); + + public AssetBase GetAsset(UUID uuid) + { + return assets.Find(x=>x.FullID == uuid); + } + + public void StoreAsset(AssetBase asset) + { + assets.Add(asset); + } + + public List FetchAssetMetadataSet(int start, int count) { return new List(count); } + } +} \ No newline at end of file diff --git a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs b/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs deleted file mode 100644 index 20ea18f..0000000 --- a/OpenSim/Tests/Common/Mock/TestAssetDataPlugin.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 OpenMetaverse; -using OpenSim.Framework; -using OpenSim.Data; - -namespace OpenSim.Tests.Common.Mock -{ - /// - /// In memory asset data plugin for test purposes. Could be another dll when properly filled out and when the - /// mono addin plugin system starts co-operating with the unit test system. Currently no locking since unit - /// tests are single threaded. - /// - public class TestAssetDataPlugin : BaseAssetRepository, IAssetDataPlugin - { - public string Version { get { return "0"; } } - public string Name { get { return "TestAssetDataPlugin"; } } - - public void Initialise() {} - public void Initialise(string connect) {} - public void Dispose() {} - - private readonly List assets = new List(); - - public AssetBase GetAsset(UUID uuid) - { - return assets.Find(x=>x.FullID == uuid); - } - - public void StoreAsset(AssetBase asset) - { - assets.Add(asset); - } - - public List FetchAssetMetadataSet(int start, int count) { return new List(count); } - } -} \ No newline at end of file -- cgit v1.1