RemoteAdmin:admin delete region

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "'''admin_delete_region''' remotely allows to delete regions. All data in the database will be removed. The region will be shut down and removed from the map. === Enabling admin...")
 
m (PHP: Fixed broken Google Code link, replacing with internal page)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''admin_delete_region''' remotely allows to delete regions. All data in the database will be removed. The region will be shut down and removed from the map.
+
'''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.
  
  
=== Enabling admin delete region ===
+
=== Enabling admin_delete_region ===
 
If not all functions are enabled, use admin_delete_region to enable the function in the [RemoteAdmin] section
 
If not all functions are enabled, use admin_delete_region to enable the function in the [RemoteAdmin] section
 
<source lang="csharp">
 
<source lang="csharp">
 
enabled_methods = admin_delete_region,...
 
enabled_methods = admin_delete_region,...
 
</source>
 
</source>
 
  
 
== Parameters ==
 
== Parameters ==
Line 46: Line 45:
 
|
 
|
 
|-
 
|-
| ''region_name''
+
| ''region_id''
| name of the new region
+
| uuid of the region
 
|
 
|
 
|}
 
|}
 
  
 
=== Error messages ===
 
=== Error messages ===
 
When an error occures the following error value are returned
 
When an error occures the following error value are returned
  
*region \"{REGION NAME}\" does not exist
+
* region \"{REGION NAME}\" does not exist
  
  
 
== Notes ==
 
== Notes ==
*If you just want to shutdown a region without removing the region from the database, use admin_close_region
+
* If you just want to shutdown a region without removing the region from the database, use admin_close_region
  
  
 
== Example ==
 
== Example ==
 
=== PHP ===
 
=== PHP ===
 +
This example needs the RemoteAdmin PHP Class file available [[RemoteAdmin:RemoteAdmin_Class|here]].
 +
 
<source lang="php">
 
<source lang="php">
 
<?php
 
<?php
Line 79: Line 79:
 
</source>
 
</source>
  
[[Category:Development]]
+
 
 +
 
 +
[[Category:RemoteAdmin]]
 +
[[Category:RemoteAdmin Commands]]

Latest revision as of 11:38, 16 March 2021

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

[edit] 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,...

[edit] Parameters

[edit] Required Parameters

These parameters are required

parameter Description Values
region_name Name of the new region


[edit] Optional Parameters

There are no optional parameters for this function


[edit] Returned Parameters

[edit] 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

[edit] Error messages

When an error occures the following error value are returned

  • region \"{REGION NAME}\" does not exist


[edit] Notes

  • If you just want to shutdown a region without removing the region from the database, use admin_close_region


[edit] Example

[edit] 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);
?>
Personal tools
General
About This Wiki