* Adds AutoOAR module, this will automatically OAR your regions every 20 minutes to a directory called "autooar", if enabled. Default disabled. Use [autooar] Enabled=true in OpenSim.ini to enable.
* Adds some MRM XMLDOC0.6.5-rc1
parent
5b103aab89
commit
918c466881
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Timers;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Autooar
|
||||
{
|
||||
public class AutooarModule : IRegionModule
|
||||
{
|
||||
private readonly Timer m_timer = new Timer(60000*20);
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
private IConfigSource config;
|
||||
private bool m_enabled = false;
|
||||
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scenes.Add(scene);
|
||||
config = source;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if(config.Configs["autooar"] != null)
|
||||
{
|
||||
m_enabled = config.Configs["autooar"].GetBoolean("Enabled", m_enabled);
|
||||
}
|
||||
|
||||
if(m_enabled)
|
||||
{
|
||||
m_timer.Elapsed += m_timer_Elapsed;
|
||||
m_timer.AutoReset = true;
|
||||
m_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
void m_timer_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (!Directory.Exists("autooars"))
|
||||
Directory.CreateDirectory("autooars");
|
||||
|
||||
foreach (Scene scene in m_scenes)
|
||||
{
|
||||
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
|
||||
archiver.ArchiveRegion(Path.Combine("autooars",
|
||||
scene.RegionInfo.RegionName + "_" + scene.RegionInfo.RegionLocX +
|
||||
"x" + scene.RegionInfo.RegionLocY + ".oar.tar.gz"));
|
||||
}
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
if (m_timer.Enabled)
|
||||
m_timer.Stop();
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "Automatic OAR Module"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,6 +5,11 @@ using OpenMetaverse;
|
|||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
/// <summary>
|
||||
/// This implements an interface similar to that provided by physics engines to OpenSim internally.
|
||||
/// Eg, PhysicsActor. It is capable of setting and getting properties related to the current
|
||||
/// physics scene representation of this object.
|
||||
/// </summary>
|
||||
public interface IObjectPhysics
|
||||
{
|
||||
bool Enabled { get; set; }
|
||||
|
|
Loading…
Reference in New Issue