stop extremely old region serialization commands from appearing in the console

as far as I know these are unused and unsupported.  Please re-enable if this is not the case.  This does not effect save-xml[2]/load-xml[2]
viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2011-01-22 00:27:34 +00:00
parent cb14e1d272
commit a32381cb9b
1 changed files with 26 additions and 27 deletions

View File

@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
private static readonly ILog m_log =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Commander m_commander = new Commander("export");
// private Commander m_commander = new Commander("export");
private List<Scene> m_regions = new List<Scene>();
private string m_savedir = "exports";
private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>();
@ -77,14 +77,13 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
m_serialisers.Add(new SerialiseObjects());
}
LoadCommanderCommands();
// LoadCommanderCommands();
}
public void AddRegion(Scene scene)
{
scene.RegisterModuleCommander(m_commander);
scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
// scene.RegisterModuleCommander(m_commander);
// scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
scene.RegisterModuleInterface<IRegionSerialiserModule>(this);
lock (m_regions)
@ -211,18 +210,18 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
#endregion
private void EventManager_OnPluginConsole(string[] args)
{
if (args[0] == "export")
{
string[] tmpArgs = new string[args.Length - 2];
int i = 0;
for (i = 2; i < args.Length; i++)
tmpArgs[i - 2] = args[i];
m_commander.ProcessConsoleCommand(args[1], tmpArgs);
}
}
// private void EventManager_OnPluginConsole(string[] args)
// {
// if (args[0] == "export")
// {
// string[] tmpArgs = new string[args.Length - 2];
// int i = 0;
// for (i = 2; i < args.Length; i++)
// tmpArgs[i - 2] = args[i];
//
// m_commander.ProcessConsoleCommand(args[1], tmpArgs);
// }
// }
private void InterfaceSaveRegion(Object[] args)
{
@ -245,15 +244,15 @@ namespace OpenSim.Region.CoreModules.World.Serialiser
}
}
private void LoadCommanderCommands()
{
Command serialiseSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory.");
serialiseSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String");
Command serialiseAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory.");
m_commander.RegisterCommand("save", serialiseSceneCommand);
m_commander.RegisterCommand("save-all", serialiseAllScenesCommand);
}
// private void LoadCommanderCommands()
// {
// Command serialiseSceneCommand = new Command("save", CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveRegion, "Saves the named region into the exports directory.");
// serialiseSceneCommand.AddArgument("region-name", "The name of the region you wish to export", "String");
//
// Command serialiseAllScenesCommand = new Command("save-all",CommandIntentions.COMMAND_NON_HAZARDOUS, InterfaceSaveAllRegions, "Saves all regions into the exports directory.");
//
// m_commander.RegisterCommand("save", serialiseSceneCommand);
// m_commander.RegisterCommand("save-all", serialiseAllScenesCommand);
// }
}
}