From fadd19f3140107d7c09e7a82a97dfb490146ccb9 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 30 Mar 2008 09:03:38 +0000 Subject: **Big ass update warning** * Renamed plugin console message, to send a message to a plugin, use either "plugin ", or any unrecognised message will be sent ("plugin" sends explicitly) This replaces the old "script ". * Terrain commands - "terrain " now works again. "Script terrain " 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. --- OpenSim/Region/Application/OpenSimMain.cs | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index ca7b7c5..60c6127 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -890,17 +890,8 @@ namespace OpenSim } break; - case "terrain": - string result = String.Empty; - - if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) - { - m_console.Error(result); - } - break; - - case "script": - m_sceneManager.SendCommandToCurrentSceneScripts(cmdparams); + case "plugin": + m_sceneManager.SendCommandToPluginModules(cmdparams); break; case "command-script": @@ -1081,14 +1072,15 @@ namespace OpenSim } } - break; - /* - * Temporarily disabled but it would be good to have this - needs to be levered - * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably) + break; + default: - m_console.Error("Unknown command"); + string[] tmpPluginArgs = new string[cmdparams.Length + 1]; + cmdparams.CopyTo(tmpPluginArgs, 1); + tmpPluginArgs[0] = command; + + m_sceneManager.SendCommandToPluginModules(tmpPluginArgs); break; - */ } } -- cgit v1.1