From 0a959343a58b06d68d86be4607003b1c3d83a981 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 18 Aug 2012 22:36:48 +0200 Subject: Make the console output from the reigon console hookable --- OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index 36af55f..413536d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs @@ -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 []", "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) -- cgit v1.1