GridUserService

From OpenSimulator

Revision as of 07:18, 5 September 2014 by Justincc (Talk | contribs)

Jump to: navigation, search

Contents

Introduction

The GridUser service that holds information about user's home region, last logged in region (as used during login), last login time, etc.

See GridUser for database table details.

API

Functions available on this service are:

  • loggedin - called to register an avatar as logged in. For internal use only.
  • loggedout - called to register an avatar as logged out. For internal use only.
  • sethome - set the home location for an avatar.
  • setposition - set current approximate region and position of an avatar. For internal use only.
  • getgriduserinfo - Get the grid user information for a user, such as home details, last region details and login/logout/online details, though these are less accurate than those that can be seen in the UserAccount service.
  • getgriduserinfos - Get griduserinfo for several users in the same call.

Calls

getgriduserinfo

Get the grid user information for a user.

The POST field is a urlencoded string like so

UserID=f2f493c0-27d3-4cf2-be97-b44dfdad13b6&METHOD=getgriduserinfo

where

  • UserID is the user ID for whom info is required.

If successful, this will return a response such as

<ServerResponse>
  <result type="List">
    <UserID>f2f493c0-27d3-4cf2-be97-b44dfdad13b6</UserID>
    <HomeRegionID>00000000-0000-0000-0000-000000000000</HomeRegionID>
    <HomePosition>&lt;0, 0, 0&gt;</HomePosition>
    <HomeLookAt>&lt;0, 0, 0&gt;</HomeLookAt>
    <LastRegionID>6f0bb095-2f17-474e-8243-21226b3f934f</LastRegionID>
    <LastPosition>&lt;131.1209, 132.1123, 25.91188&gt;</LastPosition>
    <LastLookAt>&lt;0.3348421, -0.9422743, 0&gt;</LastLookAt>
    <Online>False</Online>
    <Login>9/4/2014 7:55:33 PM</Login>
    <Logout>9/4/2014 7:58:25 PM</Logout>
  </result>
</ServerResponse>

where

  • UserID is the user ID.
  • HomeRegionID is the ID of the user's home region.
  • HomePosition is the position of the user in the home region when they go home. This is an encoding of the Vector3.ToString() where the 1st component is the x co-ordinate, the second is the y co-ordinate and the third is the z co-ordinate. For instance, if the user's home position is (100, 100, 20) then the HomePosition string here will be "&lt;100, 100, 20&gt;".
  • HomeLookAt the point the avatar is facing when they go home. This is an encoding of the Vector3.ToString() where the 1st component is the x co-ordinate and the second it the y co-ordinate. The z co-ordinate in this case is always ignored and should be 0. This is a unit vector so (0, 1, 0) is facing straight north, (1, 0, 0) is east, (0,-1, 0) is south and (-1, 0, 0) is west.
  • LastRegionID is the ID of the region where the user was last reported present. For a local avatar this will always be the region they are in unless they have logged out. For a Hypergrid foreign user this reflects the last region they occupied when present in the installation served by this grid user service.
  • LastPosition is the last position of the user reported by the simulators in this grid. This is generally only refreshed on teleport to a different region or logout and will not accurately reflect the current location of the region. The format is the same as for HomePosition above.
  • LastLookAt the point the avatar was facing when there position was last reported by the simulators in this OpenSimulator installation. This is generally only refreshed on teleport to a different region or logout and will not accurately reflect the current location of the region. The format is the same as for HomeLookAt above.
  • Online true if the user is considered to be online in this grid, false otherwise.
  • 'Login the recorded login time of this user.
  • Logout the recorded logout time of this user. This will not be accurate if the simulator they were occupying crashed or was not cleanly shut down.

If a user with the given ID does not have a grid user entry then the following is returned.

<?xml version="1.0"?>
<ServerResponse>
  <result>null</result>
</ServerResponse>
Personal tools
General
About This Wiki