RemoteAdmin

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(How to Setup the Remote Admin)
(RemoteAdmin Commands)
Line 61: Line 61:
 
   <th>Name</th>
 
   <th>Name</th>
 
   <th>Status</th>
 
   <th>Status</th>
   <th>Description</th>   
+
   <th>Description</th>
 +
  <th>Parameters</th>   
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 67: Line 68:
 
   <td></td>
 
   <td></td>
 
   <td>Create a new region</td>
 
   <td>Create a new region</td>
 +
  <td>region_name, region_master_first,
 +
region_master_last, region_master_password, listen_ip, external_address</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
 
<td>[[remoteadmin:admin_shutdown | admin_shutdown]]</td>
 
<td>[[remoteadmin:admin_shutdown | admin_shutdown]]</td>
 
<td></td>
 
<td></td>
<td>Shut down the region</td>
+
<td>Shut down the simulator</td>
 +
        <td>''No parameter needed''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 77: Line 81:
 
<td></td>
 
<td></td>
 
<td>Send a general alert</td>
 
<td>Send a general alert</td>
 +
        <td>message</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 82: Line 87:
 
<td></td>
 
<td></td>
 
<td>Restart OpenSim</td>
 
<td>Restart OpenSim</td>
 +
        <td>''No parameter needed''</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 87: Line 93:
 
<td></td>
 
<td></td>
 
<td>Load Height Map...</td>
 
<td>Load Height Map...</td>
 +
        <td>filename, regionid</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 92: Line 99:
 
<td></td>
 
<td></td>
 
<td>Create a new user</td>
 
<td>Create a new user</td>
 +
        <td>user_firstname, user_lastname, user_password,
 +
start_region_x, start_region_y</td>
 
</tr>
 
</tr>
 
<tr>
 
<tr>
Line 97: Line 106:
 
<td></td>
 
<td></td>
 
<td>Execute the Load XML command</td>
 
<td>Execute the Load XML command</td>
 +
        <td>filename</td>
 
</tr>
 
</tr>
 
</table>
 
</table>

Revision as of 06:16, 9 June 2008

Caution ! The RemoteAdmin feature is unsecured at this time. For testing uses only.

Contents

How to Setup the Remote Admin

Setup OpenSim

First you should enable the remote admin interface to do so just add the following lines to your OpenSim.ini file:

[RemoteAdmin]
enabled = true
access_password = secret

Example in Python

# Author  : DrScofield 
# Source  : http://xyzzyxyzzy.net/2008/01/23/using-pythons-xmlrpclib-with-opensim/
# License : BSD License

#!/usr/bin/python  
import xmlrpclib  
  
# XML-RPC URL (http_listener_port)  
gridServerURL = ‘http://127.0.0.1:9000′  
   
# instantiate server object  
gridServer = xmlrpclib.Server(gridServerURL)  
  
# invoke admin_alert: requires password and message  
gridServer.admin_broadcast({’password’: ’secret’,   ‘message’: ‘the answer is 42′})

Example in PHP

This example needs the RemoteAdmin PHP Class file available here.

<?php

// Author  : Olish Newman
// Source  : http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass
// Licence : BSD License

// Including the RemoteAdmin PHP class. It can be downloaded from the link above.
include('RemoteAdmin.php');

// Instantiate the class with parameters identical to the Python example above
$myRemoteAdmin = new RemoteAdmin('127.0.0.1', 9000, 'secret');

// Invoke admin_broadcast
$parameters = array('message' => 'the answer is 42');
$myRemoteAdmin->SendCommand('admin_broadcast', $parameters);

// Invoke admin_shutdown (example for use without parameters)
$myRemoteAdmin->SendCommand('admin_shutdown');

?>

RemoteAdmin Commands

Name Status Description Parameters
admin_create_region Create a new region region_name, region_master_first, region_master_last, region_master_password, listen_ip, external_address
admin_shutdown Shut down the simulator No parameter needed
admin_broadcast Send a general alert message
admin_restart Restart OpenSim No parameter needed
admin_load_heightmap Load Height Map... filename, regionid
admin_create_user Create a new user user_firstname, user_lastname, user_password, start_region_x, start_region_y
admin_load_xml Execute the Load XML command filename

Credits

Thanks to DrScofield for the Python Script Sources : http://xyzzyxyzzy.net/2008/01/23/using-pythons-xmlrpclib-with-opensim/

General
About This Wiki