RemoteAdmin:admin teleport agent

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Example in Python)
m (Robot: Cosmetic changes)
Line 112: Line 112:
  
  
=== Python ===
+
=== Python ===
  
 
<source lang="python">
 
<source lang="python">

Revision as of 20:07, 3 March 2012

admin_teleport_agent remotely teleport an agent to a given region and/or position


Contents

Enabling admin_teleport_agent

If not all functions are enabled, use admin_create_teleport_agent to enable the function in the [RemoteAdmin] section

enabled_methods = admin_teleport_agent,...


Parameters

Required Parameters

These parameters are required

parameter Description Values
region_name Name of the new region
agent_id agent uuid, optionaly agent_first_name and agent_last_name


Optional Parameters

These parameters are optional and do not need to be set

parameter Description Values
agent_first_name first name of agent
agent_last_name last name of agent
pos_x teleport to region position x
pos_y teleport to region position y
pos_z teleport to region position z
lookat_x look in direction x
lookat_y look in direction y
lookat_z look in direction z


Returned Parameters

Returned Parameters

These parameters are returned by Remote Admin

parameter Description Values
success true


Error messages

No error messages


Notes

  • From commit 415b7b7 on Wed 7 Dec 2011 (OpenSim 0.7.3-dev)

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_teleport_agent (multiple parameters)
$parameters = array('region_name' => 'My Plaza', 'user_firstname' => 'John', 'user_lastname' => 'Doe', 'pos_x' => '15', 'pos_y' => '10');
$myRemoteAdmin->SendCommand('admin_teleport_agent', $parameters);
?>


Python

#!/usr/bin/python 
import xmlrpclib 
 
# XML-RPC URL (http_listener_port) 
simulatorURL = "http://127.0.0.1:5000"
 
# instantiate server object 
simulator = xmlrpclib.Server(simulatorURL) 
 
# invoke admin_alert: requires password and message 
simulator.admin_teleport_agent({'password':'secret', 'agent_first_name':'John','agent_last_name':'Doe','region_name':'My Plaza', 'pos_x':'15', 'pos_y':'10'})

RemoteAdmin RemoteAdmin:Commands

Personal tools
General
About This Wiki