From d8125fb1f72a6d106a5acff71570289c629b315e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 14 Aug 2012 21:56:08 +0100
Subject: minor: Add Gryc Ueusp to CREDITS for commit 884edac amongst others,
by request.
---
CONTRIBUTORS.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 608a032..22b29a9 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -91,6 +91,7 @@ what it is today.
* Fly-Man
* Flyte Xevious
* Garmin Kawaguichi
+* Gryc Ueusp
* Imaze Rhiano
* Intimidated
* Jeremy Bongio (IBM)
--
cgit v1.1
From faa710aee13347c4c55690f516ffda9179a92f3c Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 14 Aug 2012 21:54:47 +0200
Subject: Allow the use of the region debug console found in recent viewers.
This console will be available to estate owners and managers. If the user
using the console had god privs, they can use "set console on" and "set
console off" to switch on the actual region console. This allows console
access from within the viewer. The region debug console can coexist with any
other main console.
---
OpenSim/Framework/Console/CommandConsole.cs | 9 +++++
OpenSim/Framework/Console/LocalConsole.cs | 4 ++-
OpenSim/Framework/Console/MockConsole.cs | 4 ++-
OpenSim/Framework/Console/RemoteConsole.cs | 1 +
OpenSim/Framework/ICommandConsole.cs | 6 +++-
.../Region/Framework/Interfaces/IRegionConsole.cs | 39 ++++++++++++++++++++++
6 files changed, 60 insertions(+), 3 deletions(-)
create mode 100644 OpenSim/Region/Framework/Interfaces/IRegionConsole.cs
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 87bdacd..bd23d1c 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -678,6 +678,8 @@ namespace OpenSim.Framework.Console
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ public event OnOutputDelegate OnOutput;
+
public ICommands Commands { get; private set; }
public CommandConsole(string defaultPrompt) : base(defaultPrompt)
@@ -697,6 +699,13 @@ namespace OpenSim.Framework.Console
Output(s);
}
+ protected void FireOnOutput(string text)
+ {
+ OnOutputDelegate onOutput = OnOutput;
+ if (onOutput != null)
+ onOutput(text);
+ }
+
///
/// Display a command prompt on the console and wait for user input
///
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index f65813b..d41481f 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -319,6 +319,8 @@ namespace OpenSim.Framework.Console
public override void Output(string text, string level)
{
+ FireOnOutput(text);
+
lock (m_commandLine)
{
if (m_cursorYPosition == -1)
@@ -509,4 +511,4 @@ namespace OpenSim.Framework.Console
}
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Framework/Console/MockConsole.cs b/OpenSim/Framework/Console/MockConsole.cs
index 4d8751f..b489f93 100644
--- a/OpenSim/Framework/Console/MockConsole.cs
+++ b/OpenSim/Framework/Console/MockConsole.cs
@@ -40,6 +40,8 @@ namespace OpenSim.Framework.Console
///
public class MockConsole : ICommandConsole
{
+ public event OnOutputDelegate OnOutput;
+
private MockCommands m_commands = new MockCommands();
public ICommands Commands { get { return m_commands; } }
@@ -76,4 +78,4 @@ namespace OpenSim.Framework.Console
public string[] Resolve(string[] cmd) { return null; }
public XmlElement GetXml(XmlDocument doc) { return null; }
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index eabb62d..27edd4b 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -100,6 +100,7 @@ namespace OpenSim.Framework.Console
m_LineNumber++;
m_Scrollback.Add(String.Format("{0}", m_LineNumber)+":"+level+":"+text);
}
+ FireOnOutput(text.Trim());
System.Console.WriteLine(text.Trim());
}
diff --git a/OpenSim/Framework/ICommandConsole.cs b/OpenSim/Framework/ICommandConsole.cs
index ca0ff93..8cd20da 100644
--- a/OpenSim/Framework/ICommandConsole.cs
+++ b/OpenSim/Framework/ICommandConsole.cs
@@ -74,8 +74,12 @@ namespace OpenSim.Framework
XmlElement GetXml(XmlDocument doc);
}
+ public delegate void OnOutputDelegate(string message);
+
public interface ICommandConsole : IConsole
{
+ event OnOutputDelegate OnOutput;
+
ICommands Commands { get; }
///
@@ -87,4 +91,4 @@ namespace OpenSim.Framework
string ReadLine(string p, bool isCommand, bool e);
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs b/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs
new file mode 100644
index 0000000..4d261d6
--- /dev/null
+++ b/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs
@@ -0,0 +1,39 @@
+/*
+ * 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 OpenMetaverse;
+using OpenSim.Framework;
+
+namespace OpenSim.Region.Framework.Interfaces
+{
+ public interface IRegionConsole
+ {
+ bool RunCommand(string command, UUID invokerID);
+ void SendConsoleOutput(UUID agentID, string message);
+ void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn);
+ }
+}
--
cgit v1.1
From f6562e226915dc09d78df43111c9c481b95bdcc8 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 14 Aug 2012 21:58:07 +0200
Subject: Actually add the module
---
.../ClientStack/Linden/Caps/RegionConsoleModule.cs | 234 +++++++++++++++++++++
1 file changed, 234 insertions(+)
create mode 100644 OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
new file mode 100644
index 0000000..36af55f
--- /dev/null
+++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs
@@ -0,0 +1,234 @@
+/*
+ * 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;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.Reflection;
+using System.IO;
+using System.Web;
+using log4net;
+using Nini.Config;
+using Mono.Addins;
+using OpenMetaverse;
+using OpenMetaverse.StructuredData;
+using OpenMetaverse.Imaging;
+using OpenSim.Framework;
+using OpenSim.Framework.Console;
+using OpenSim.Framework.Servers;
+using OpenSim.Framework.Servers.HttpServer;
+using OpenSim.Region.Framework.Interfaces;
+using OpenSim.Region.Framework.Scenes;
+using OpenSim.Services.Interfaces;
+using Caps = OpenSim.Framework.Capabilities.Caps;
+using OpenSim.Capabilities.Handlers;
+
+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 Scene m_scene;
+ private IEventQueue m_eventQueue;
+ private Commands m_commands = new Commands();
+ public ICommands Commands { get { return m_commands; } }
+
+ public void Initialise(IConfigSource source)
+ {
+ m_commands.AddCommand( "Help", false, "help", "help [- ]", "Display help on a particular command or on a list of commands in a category", Help);
+ }
+
+ public void AddRegion(Scene s)
+ {
+ m_scene = s;
+ m_scene.RegisterModuleInterface(this);
+ }
+
+ public void RemoveRegion(Scene s)
+ {
+ m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
+ m_scene = null;
+ }
+
+ public void RegionLoaded(Scene s)
+ {
+ m_scene.EventManager.OnRegisterCaps += RegisterCaps;
+ m_eventQueue = m_scene.RequestModuleInterface();
+ }
+
+ public void PostInitialise()
+ {
+ }
+
+ public void Close() { }
+
+ public string Name { get { return "RegionConsoleModule"; } }
+
+ public Type ReplaceableInterface
+ {
+ get { return null; }
+ }
+
+ public void RegisterCaps(UUID agentID, Caps caps)
+ {
+ if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID))
+ return;
+
+ UUID capID = UUID.Random();
+
+ m_log.DebugFormat("[REGION CONSOLE]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
+ caps.RegisterHandler(
+ "SimConsoleAsync",
+ new ConsoleHandler("/CAPS/" + capID + "/", "SimConsoleAsync", agentID, this, m_scene));
+ }
+
+ public void SendConsoleOutput(UUID agentID, string message)
+ {
+ OSD osd = OSD.FromString(message);
+
+ m_eventQueue.Enqueue(EventQueueHelper.BuildEvent("SimConsoleResponse", osd), agentID);
+ }
+
+ public bool RunCommand(string command, UUID invokerID)
+ {
+ string[] parts = Parser.Parse(command);
+ Array.Resize(ref parts, parts.Length + 1);
+ parts[parts.Length - 1] = invokerID.ToString();
+
+ if (m_commands.Resolve(parts).Length == 0)
+ return false;
+
+ return true;
+ }
+
+ private void Help(string module, string[] cmd)
+ {
+ UUID agentID = new UUID(cmd[cmd.Length - 1]);
+ Array.Resize(ref cmd, cmd.Length - 1);
+
+ List help = Commands.GetHelp(cmd);
+
+ string reply = String.Empty;
+
+ foreach (string s in help)
+ {
+ reply += s + "\n";
+ }
+
+ SendConsoleOutput(agentID, reply);
+ }
+
+ public void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn)
+ {
+ m_commands.AddCommand(module, shared, command, help, longhelp, fn);
+ }
+ }
+
+ public class ConsoleHandler : BaseStreamHandler
+ {
+ private static readonly ILog m_log =
+ LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ private RegionConsoleModule m_consoleModule;
+ private UUID m_agentID;
+ private bool m_isGod;
+ private Scene m_scene;
+ private bool m_consoleIsOn = false;
+
+ public ConsoleHandler(string path, string name, UUID agentID, RegionConsoleModule module, Scene scene)
+ :base("POST", path, name, agentID.ToString())
+ {
+ m_agentID = agentID;
+ m_consoleModule = module;
+ m_scene = scene;
+
+ m_isGod = m_scene.Permissions.IsGod(agentID);
+ }
+
+ public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
+ {
+ StreamReader reader = new StreamReader(request);
+ string message = reader.ReadToEnd();
+
+ OSD osd = OSDParser.DeserializeLLSDXml(message);
+
+ string cmd = osd.AsString();
+ if (cmd == "set console on")
+ {
+ if (m_isGod)
+ {
+ MainConsole.Instance.OnOutput += ConsoleSender;
+ m_consoleIsOn = true;
+ m_consoleModule.SendConsoleOutput(m_agentID, "Console is now on");
+ }
+ return new byte[0];
+ }
+ else if (cmd == "set console off")
+ {
+ MainConsole.Instance.OnOutput -= ConsoleSender;
+ m_consoleIsOn = false;
+ m_consoleModule.SendConsoleOutput(m_agentID, "Console is now off");
+ return new byte[0];
+ }
+
+ if (m_consoleIsOn == false && m_consoleModule.RunCommand(osd.AsString().Trim(), m_agentID))
+ return new byte[0];
+
+ if (m_isGod && m_consoleIsOn)
+ {
+ MainConsole.Instance.RunCommand(osd.AsString().Trim());
+ }
+ else
+ {
+ m_consoleModule.SendConsoleOutput(m_agentID, "Unknown command");
+ }
+
+ return new byte[0];
+ }
+
+ private void ConsoleSender(string text)
+ {
+ m_consoleModule.SendConsoleOutput(m_agentID, text);
+ }
+
+ private void OnMakeChildAgent(ScenePresence presence)
+ {
+ if (presence.UUID == m_agentID)
+ {
+ MainConsole.Instance.OnOutput -= ConsoleSender;
+ m_consoleIsOn = false;
+ }
+ }
+ }
+}
--
cgit v1.1
From dc82ad0f7abe5f09675dfc3768da2a0134503916 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 15 Aug 2012 02:06:22 +0100
Subject: Add a skeleton for a name value storage associated with regions
---
OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 13 +++++++++++
OpenSim/Data/MySQL/MySQLSimulationData.cs | 13 +++++++++++
.../Data/MySQL/Resources/RegionStore.migrations | 7 ++++++
OpenSim/Data/Null/NullSimulationData.cs | 13 +++++++++++
OpenSim/Data/SQLite/SQLiteSimulationData.cs | 12 ++++++++++
.../Framework/Interfaces/ISimulationDataService.cs | 5 +++++
.../Framework/Interfaces/ISimulationDataStore.cs | 6 +++++
OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++++
.../Connectors/Simulation/SimulationDataService.cs | 14 ++++++++++++
OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs | 26 ++++++++++++++++++++++
10 files changed, 113 insertions(+)
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index 3f29f5b..17f42e1 100644
--- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
@@ -2202,5 +2202,18 @@ VALUES
}
}
}
+
+ public void SaveExtra(UUID regionID, string name, string value)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
}
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 1a2e113..be985ab 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -1966,5 +1966,18 @@ namespace OpenSim.Data.MySQL
}
}
}
+
+ public void SaveExtra(UUID regionID, string name, string val)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
}
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 4a925fb..5b59779 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -895,3 +895,10 @@ CREATE TABLE `regionenvironment` (
COMMIT;
+:VERSION 45
+
+BEGIN;
+
+CREATE TABLE `regionextra` (`RegionID` char(36) not null, `Name` varchar(32) not null, `value` text, primary key(`RegionID`, `Name`));
+
+COMMIT;
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index 8f2314f..4979cf6 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -151,5 +151,18 @@ namespace OpenSim.Data.Null
public void Shutdown()
{
}
+
+ public void SaveExtra(UUID regionID, string name, string value)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
}
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index f40e866..56df3cb 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -2890,5 +2890,17 @@ namespace OpenSim.Data.SQLite
}
}
+ public void SaveExtra(UUID regionID, string name, string value)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
index 0fcafcc..085b5ca 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
@@ -116,5 +116,10 @@ namespace OpenSim.Region.Framework.Interfaces
/// the region UUID
void RemoveRegionEnvironmentSettings(UUID regionUUID);
+ void SaveExtra(UUID regionID, string name, string value);
+
+ void RemoveExtra(UUID regionID, string name);
+
+ Dictionary GetExtra(UUID regionID);
}
}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index e424976..3787ca0 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -127,6 +127,12 @@ namespace OpenSim.Region.Framework.Interfaces
/// the region UUID
void RemoveRegionEnvironmentSettings(UUID regionUUID);
+ void SaveExtra(UUID regionID, string name, string val);
+
+ void RemoveExtra(UUID regionID, string name);
+
+ Dictionary GetExtra(UUID regionID);
+
void Shutdown();
}
}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0967c34..59f49ea 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -174,6 +174,8 @@ namespace OpenSim.Region.Framework.Scenes
protected ICapabilitiesModule m_capsModule;
protected IGroupsModule m_groupsModule;
+ private Dictionary m_extraSettings;
+
///
/// Current scene frame number
///
@@ -635,6 +637,8 @@ namespace OpenSim.Region.Framework.Scenes
// FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
// region is set up and avoid these gyrations.
RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID);
+ m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID);
+
bool updatedTerrainTextures = false;
if (rs.TerrainTexture1 == UUID.Zero)
{
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
index c9cbbfa..504fcaf 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
@@ -164,5 +164,19 @@ namespace OpenSim.Services.Connectors
m_database.RemoveRegionEnvironmentSettings(regionUUID);
}
+ public void SaveExtra(UUID regionID, string name, string val)
+ {
+ m_database.SaveExtra(regionID, name, val);
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ m_database.RemoveExtra(regionID, name);
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return m_database.GetExtra(regionID);
+ }
}
}
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 1845eb9..ed29c39 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -127,6 +127,19 @@ namespace OpenSim.Data.Null
{
m_store.RemoveRegionEnvironmentSettings(regionUUID);
}
+
+ public void SaveExtra(UUID regionID, string name, string value)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
///
@@ -318,5 +331,18 @@ namespace OpenSim.Data.Null
public void Shutdown()
{
}
+
+ public void SaveExtra(UUID regionID, string name, string value)
+ {
+ }
+
+ public void RemoveExtra(UUID regionID, string name)
+ {
+ }
+
+ public Dictionary GetExtra(UUID regionID)
+ {
+ return null;
+ }
}
}
--
cgit v1.1