From 26dca1adc32e834e9debf47e66625fa36e7f3ace Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 19 Feb 2013 23:53:30 +0000 Subject: [PATCH 1/4] Convert JsonTestPath() use in json regression tests to JsonGetPathType() instead --- .../Tests/JsonStoreScriptModuleTests.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index db82d4bcdd..b64dbd40e9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs @@ -158,8 +158,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests Assert.That(dsrv, Is.EqualTo(1)); - int tprv = (int)InvokeOp("JsonTestPath", storeId, "Hello"); - Assert.That(tprv, Is.EqualTo(0)); + int tprv = (int)InvokeOp("JsonGetPathType", storeId, "Hello"); + Assert.That(tprv, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF)); } [Test] @@ -277,8 +277,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); Assert.That(returnValue, Is.EqualTo(1)); - int result = (int)InvokeOp("JsonTestPath", storeId, "Hello"); - Assert.That(result, Is.EqualTo(0)); + int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello"); + Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF)); string returnValue2 = (string)InvokeOp("JsonGetValue", storeId, "Hello"); Assert.That(returnValue2, Is.EqualTo("")); @@ -291,8 +291,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); Assert.That(returnValue, Is.EqualTo(1)); - int result = (int)InvokeOp("JsonTestPath", storeId, "Hello"); - Assert.That(result, Is.EqualTo(0)); + int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello"); + Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF)); string returnValue2 = (string)InvokeOp("JsonGetJson", storeId, "Hello"); Assert.That(returnValue2, Is.EqualTo("")); @@ -306,11 +306,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); Assert.That(returnValue, Is.EqualTo(1)); - int result = (int)InvokeOp("JsonTestPath", storeId, "Hello[0]"); - Assert.That(result, Is.EqualTo(1)); + int result = (int)InvokeOp("JsonGetPathType", storeId, "Hello[0]"); + Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_VALUE)); - result = (int)InvokeOp("JsonTestPath", storeId, "Hello[1]"); - Assert.That(result, Is.EqualTo(0)); + result = (int)InvokeOp("JsonGetPathType", storeId, "Hello[1]"); + Assert.That(result, Is.EqualTo(JsonStoreScriptModule.JSON_TYPE_UNDEF)); string stringReturnValue = (string)InvokeOp("JsonGetValue", storeId, "Hello[0]"); Assert.That(stringReturnValue, Is.EqualTo("value2")); From 8a6f2432fc0c57645cb395578f373474548975e9 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Feb 2013 00:01:20 +0000 Subject: [PATCH 2/4] minor: remove some mono compiler warnings in OpenSim.Region.ClientStack.Linden.Caps.dll --- .../ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 +- .../Region/ClientStack/Linden/Caps/RegionConsoleModule.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 1af61db48b..20df8a6a2e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -912,7 +912,7 @@ namespace OpenSim.Region.ClientStack.Linden string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); +// OSDMap req = (OSDMap)OSDParser.DeserializeLLSDXml(request); OSDMap resp = new OSDMap(); OSDMap accessPrefs = new OSDMap(); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index 17c7270479..69dd76fe45 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs @@ -56,8 +56,8 @@ namespace OpenSim.Region.ClientStack.Linden [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionConsoleModule")] public class RegionConsoleModule : INonSharedRegionModule, IRegionConsole { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; private IEventQueue m_eventQueue; @@ -157,8 +157,8 @@ namespace OpenSim.Region.ClientStack.Linden public class ConsoleHandler : BaseStreamHandler { - private static readonly ILog m_log = - LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = +// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private RegionConsoleModule m_consoleModule; private UUID m_agentID; From db2b3627f2e22f6e677dc77cd0225c3937fff1b8 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Feb 2013 00:48:02 +0000 Subject: [PATCH 3/4] Add information about MinLoginLevel to example ini files --- bin/Robust.ini.example | 7 ++++++- bin/config-include/StandaloneCommon.ini.example | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index eee313aba5..05ea67024f 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -261,7 +261,12 @@ MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnecto LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" - ;; Ask co-operative viewers to use a different currency name + ; The minimum user level required for a user to be able to login. 0 by default + ; If you disable a particular user's account then you can set their login level below this number. + ; You can also change this level from the console though these changes will not be persisted. + ; MinLoginLevel = 0 + + ; Ask co-operative viewers to use a different currency name ;Currency = "" WelcomeMessage = "Welcome, Avatar!" diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index f28de437cd..ffa2d4999a 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -85,6 +85,11 @@ ;; For Viewer 2 MapTileURL = "http://127.0.0.1:9000/" + ; The minimum user level required for a user to be able to login. 0 by default + ; If you disable a particular user's account then you can set their login level below this number. + ; You can also change this level from the console though these changes will not be persisted. + ; MinLoginLevel = 0 + ;; Ask co-operative viewers to use a different currency name ;Currency = "" From 05a0998f57437c8fc38e9876dfda5ad037ddeb5f Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 20 Feb 2013 00:51:55 +0000 Subject: [PATCH 4/4] Give the user some feedback about the success or failure of console login property commands --- OpenSim/Services/LLLoginService/LLLoginService.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 59fb55981b..5f30f84f74 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -961,14 +961,25 @@ namespace OpenSim.Services.LLLoginService // or fixing critical issues // if (cmd.Length > 2) - Int32.TryParse(cmd[2], out m_MinLoginLevel); + { + if (Int32.TryParse(cmd[2], out m_MinLoginLevel)) + MainConsole.Instance.OutputFormat("Set minimum login level to {0}", m_MinLoginLevel); + else + MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid login level", cmd[2]); + } break; - case "reset": + + case "reset": m_MinLoginLevel = 0; + MainConsole.Instance.OutputFormat("Reset min login level to {0}", m_MinLoginLevel); break; + case "text": if (cmd.Length > 2) + { m_WelcomeMessage = cmd[2]; + MainConsole.Instance.OutputFormat("Login welcome message set to '{0}'", m_WelcomeMessage); + } break; } }