diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index 36af55f0f3..413536da28 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) diff --git a/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs b/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs index 4d261d6655..5d5ce3440a 100644 --- a/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs +++ b/OpenSim/Region/Framework/Interfaces/IRegionConsole.cs @@ -30,8 +30,12 @@ using OpenSim.Framework; namespace OpenSim.Region.Framework.Interfaces { + public delegate void ConsoleMessage(UUID toAgentID, string message); + public interface IRegionConsole { + event ConsoleMessage OnConsoleMessage; + bool RunCommand(string command, UUID invokerID); void SendConsoleOutput(UUID agentID, string message); void AddCommand(string module, bool shared, string command, string help, string longhelp, CommandDelegate fn); diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs index 417b62017c..31d0034444 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs @@ -76,7 +76,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments if (m_console != null) { - m_console.AddCommand("TempATtachModule", false, "set auto_grant_attach_perms", "set auto_grant_attach_perms true|false", "Allow objects owned by the region owner os estate managers to obtain attach permissions without asking the user", SetAutoGrantAttachPerms); + m_console.AddCommand("TempAttachModule", false, "set auto_grant_attach_perms", "set auto_grant_attach_perms true|false", "Allow objects owned by the region owner os estate managers to obtain attach permissions without asking the user", SetAutoGrantAttachPerms); } } else