RemoteAdmin:admin create region
From OpenSimulator
(Difference between revisions)
												
			m  | 
			 (→admin create region)  | 
			||
| Line 1: | Line 1: | ||
| − | + | = admin create region =  | |
| − | admin_create_region remotely allows to create a new regions.  | + | '''admin_create_region''' remotely allows to create a new regions and add them to an estate.  | 
| − | To use admin_create_region   | + | |
| + | === Enabling admin create region ===  | ||
| + | To use admin_create_region one needs to enable the function in the [RemoteAdmin] section  | ||
<source lang="csharp">  | <source lang="csharp">  | ||
enabled_methods = admin_create_region  | enabled_methods = admin_create_region  | ||
</source>  | </source>  | ||
| − | + | == Paramenters ==  | |
| + | === Required paramenters ===  | ||
{{multicol}}  | {{multicol}}  | ||
*''region_name'' - Name of the new region  | *''region_name'' - Name of the new region  | ||
| Line 32: | Line 35: | ||
{{multicol-end}}  | {{multicol-end}}  | ||
| + | == Notes ==  | ||
| + | {{multicol}}  | ||
| + | *When adding a region to a known estate in the Database one does not need to specify the estate owner. If the estate is new and needs to be created first, then use the ''estate_owner_uuid'' or ''estate_owner_first'' + ''estate_owner_last''.  | ||
| + | *When using the optional ''persist'' parameter the region configs will be saved to the default region file. You can specify a the file using region_file if you dont want to use the default  | ||
| + | {{multicol-end}}  | ||
| + | |||
| + | == Example ==  | ||
| + | === PHP ===  | ||
| + | <source lang="php">  | ||
| + | <?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', 'listen_ip' => '0.0.0.0', 'listen_port' => '9001', 'region_x' => '1000', 'region_y' => '1000', 'estate_name' => 'My Estate');  | ||
| + | $myRemoteAdmin->SendCommand('admin_create_region', $parameters);  | ||
| + | ?>  | ||
| + | </source>  | ||
| − | [[Category:Development]]  | + | [[Category:Development][Remoteadmin]]  | 
Revision as of 09:12, 8 October 2011
Contents | 
admin create region
admin_create_region remotely allows to create a new regions and add them to an estate.
Enabling admin create region
To use admin_create_region one needs to enable the function in the [RemoteAdmin] section
enabled_methods = admin_create_region
Paramenters
Required paramenters
  | 
Optional paramenters
  | 
Notes
  | 
Example
PHP
<?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', 'listen_ip' => '0.0.0.0', 'listen_port' => '9001', 'region_x' => '1000', 'region_y' => '1000', 'estate_name' => 'My Estate'); $myRemoteAdmin->SendCommand('admin_create_region', $parameters); ?>
[[Category:Development][Remoteadmin]]