RemoteAdmin:admin delete region
From OpenSimulator
(Difference between revisions)
m (Robot: Cosmetic changes) |
(→PHP) |
||
Line 62: | Line 62: | ||
== Example == | == Example == | ||
=== PHP === | === PHP === | ||
+ | This example needs the RemoteAdmin PHP Class file available [http://code.google.com/p/opensimtools/wiki/RemoteAdminPHPClass here]. | ||
+ | |||
<source lang="php"> | <source lang="php"> | ||
<?php | <?php |
Revision as of 16:01, 7 November 2013
admin_delete_region remotely allows to delete regions. All region data in the database will be removed. The region will be shutdown and removed from the map.
Contents |
Enabling admin_delete_region
If not all functions are enabled, use admin_delete_region to enable the function in the [RemoteAdmin] section
enabled_methods = admin_delete_region,...
Parameters
Required Parameters
These parameters are required
parameter | Description | Values |
---|---|---|
region_name | Name of the new region |
Optional Parameters
There are no optional parameters for this function
Returned Parameters
Returned Parameters
These parameters are returned by Remote Admin
parameter | Description | Values |
---|---|---|
success | true when successfull | true, false |
error | error message when not successfull | |
region_id | uuid of the region |
Error messages
When an error occures the following error value are returned
- region \"{REGION NAME}\" does not exist
Notes
- If you just want to shutdown a region without removing the region from the database, use admin_close_region
Example
PHP
This example needs the RemoteAdmin PHP Class file available here.
<?php // Including the RemoteAdmin PHP class. 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_create_user (multiple parameters) $parameters = array('region_name' => 'My Plaza'); $myRemoteAdmin->SendCommand('admin_delete_region', $parameters); ?>