Make the console output from the reigon console hookable

This commit is contained in:
Melanie
2012-08-18 22:36:48 +02:00
parent 2efd13ae18
commit 0a959343a5
2 changed files with 11 additions and 0 deletions

View File

@@ -64,6 +64,8 @@ namespace OpenSim.Region.ClientStack.Linden
private Commands m_commands = new Commands();
public ICommands Commands { get { return m_commands; } }
public event ConsoleMessage OnConsoleMessage;
public void Initialise(IConfigSource source)
{
m_commands.AddCommand( "Help", false, "help", "help [<item>]", "Display help on a particular command or on a list of commands in a category", Help);
@@ -118,6 +120,11 @@ namespace OpenSim.Region.ClientStack.Linden
OSD osd = OSD.FromString(message);
m_eventQueue.Enqueue(EventQueueHelper.BuildEvent("SimConsoleResponse", osd), agentID);
ConsoleMessage handlerConsoleMessage = OnConsoleMessage;
if (handlerConsoleMessage != null)
handlerConsoleMessage( agentID, message);
}
public bool RunCommand(string command, UUID invokerID)