mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
**Big ass update warning**
* Renamed plugin console message, to send a message to a plugin, use either "plugin <message>", or any unrecognised message will be sent ("plugin" sends explicitly) This replaces the old "script <message>".
* Terrain commands - "terrain <command>" now works again. "Script terrain <command>" does not. Many of the commands have now been reimplemented, eg load-tile. However some have new syntax.
* New console command handler, you can now use things like "terrain help" or "terrain save help". See TerrainModule.cs for an example of how to use the new "Commander" class.
* Commander class - advanced processing of console input and also enables a script API to be generated from registered console commands.
This commit is contained in:
16
OpenSim/Region/Environment/Interfaces/ICommand.cs
Normal file
16
OpenSim/Region/Environment/Interfaces/ICommand.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
|
||||
using OpenSim.Region.Environment.Modules.ModuleFramework;
|
||||
|
||||
namespace OpenSim.Region.Environment.Interfaces
|
||||
{
|
||||
public interface ICommand
|
||||
{
|
||||
void AddArgument(string name, string helptext, string type);
|
||||
System.Collections.Generic.Dictionary<string, string> Arguments { get; }
|
||||
string Help { get; }
|
||||
string Name { get; }
|
||||
void Run(object[] args);
|
||||
void ShowConsoleHelp();
|
||||
}
|
||||
}
|
||||
16
OpenSim/Region/Environment/Interfaces/ICommandableModule.cs
Normal file
16
OpenSim/Region/Environment/Interfaces/ICommandableModule.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenSim.Region.Environment.Modules.ModuleFramework;
|
||||
|
||||
namespace OpenSim.Region.Environment.Interfaces
|
||||
{
|
||||
public interface ICommandableModule
|
||||
{
|
||||
ICommander CommandInterface
|
||||
{
|
||||
get;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
OpenSim/Region/Environment/Interfaces/ICommander.cs
Normal file
14
OpenSim/Region/Environment/Interfaces/ICommander.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
using OpenSim.Region.Environment.Modules.ModuleFramework;
|
||||
|
||||
namespace OpenSim.Region.Environment.Interfaces
|
||||
{
|
||||
public interface ICommander
|
||||
{
|
||||
void ProcessConsoleCommand(string function, string[] args);
|
||||
void RegisterCommand(string commandName, ICommand command);
|
||||
void Run(string function, object[] args);
|
||||
string GenerateRuntimeAPI();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user