DATA ONLINE

From Second Life Wiki
Jump to navigation Jump to search

Description

Constant: integer DATA_ONLINE = 1;

The integer constant DATA_ONLINE has the value 1

Used with llRequestAgentData to return a string that contains the integer boolean for if the user is online (or not). TRUE if online, FALSE if offline.

Caveats

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   llRequestAgentData with DATA_ONLINE parameter has a delay of up to 10 minutes in reporting offline status

Related Articles

Constants

DATA_ONLINE 1 (integerboolean If the requested agent is online
DATA_NAME 2 string The requested agent's legacy name
DATA_BORN 3 string The account creation/"born on" date as a string in an ISO 8601 format of YYYY-MM-DD.
DATA_RATING 4 llCSV2List() Deprecated: Returns [0, 0, 0, 0, 0, 0]
Used to return: [pos_behavior, neg_behavior, pos_appearance, neg_appearance, pos_building, neg_building]
DATA_PAYINFO 8 (integermask Flag Description
PAYMENT_INFO_ON_FILE 0x1 If payment info is on file.
PAYMENT_INFO_USED 0x2 If payment info has been used.

Functions

•  llRequestAgentData

Events

•  dataserver

Examples

key queryID; // the id key 

default
{
    state_entry()
    {
        key id = llGetOwner(); // get the owner key
        queryID = llRequestAgentData( id, DATA_ONLINE ); // returns if the owner is online or not
    }
    
    dataserver( key query, string info )
    {
        // find the correct query id
        if( query == queryID )
        {
            string message;
            
            // convert the info to an actual message
            if( info == "1" ) 
            {
                message = "Online";
            }
            
            else if( info == "0" )
            {
                message = "Offline";
            }
            
            // display that they are online or offline in owner say.
            llOwnerSay( "The owner of this object is: " + message );
        }
    }
}

Deep Notes

All Issues

~ Search JIRA for related Issues
   llRequestAgentData with DATA_ONLINE parameter has a delay of up to 10 minutes in reporting offline status

Signature

integer DATA_ONLINE = 1;