RemoteAdmin:RemoteAdmin Implement new command

How to implement new commands to Remote Admin
When implementing a new RemoteAdmin command you need to edit /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs

Please see RemoteAdmin Standards for proposed naming schema

Lets assume we want to create a command that outputs a line in the console containing a message and the region uuid of a region we choose.

Step 1 - Adding a new Command
First we need to define our new command and make it available. In the function public void Initialise(OpenSimBase openSim) you will find a list of all implemented commands. The available commands start with availableMethods.... There we add our new command, lets call it admin_output_message.

We will now add a new availableMethods to those already listed, were admin_output_message is our command and XmlRpcOutputMessage will be the function in which our command does the work wehn called (step 2).

Step 2 - Coding our new command
In Step 1 we added a new command which calls the function XmlRpcOutputMessage. So our next step is to create our new function and include all the goddies our command will execute.


 * Our new function always starts of with creating the Hashtable responseData and requestData. In the requestData list we have all parameters we are recieving from our external application while responseData is the list of data we are sending back...
 * If we have parameters that are needed and may not be empty, then one check these parameters using CheckStringParameters and CheckIntegerParams. If any of the specified paramaters, in our case the string "message" is not given, then a error with exeption will be given and the rest of our code will not be executed.
 * As we want to send region data of a given region_id or region_name we use CheckRegionParamsInScene. This will output us the scene of the region if it exists. Both region_id and region_name are checked. If no region is found then scene = null and a error_mesage is returned. The error message can be used to send back as responseData["error"]
 * As a response we always send responseData["success"] as true or false were true only is returned if no errors occured.
 * If errors occure, we send the error message to our application as responseData["error"]

RemoteAdmin