Difference between revisions of "Logoff"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(7 intermediate revisions by 4 users not shown)
Line 4: Line 4:
|func_sleep
|func_sleep
|func_energy
|func_energy
|event=ignored
|event=logoff
|p1_type=key|p1_name=id|p1_desc=The agent that clicked the ignore button.
|p2_type=integer|p2_name=channel|p2_desc=The channel on which the dialog was opened


|event_desc= ignored() Sent as a result of the user clicking ignored in a dialog
|event_desc= logoff() Sent as a result of the user quitting the Second Life client/viewer
|return_text
|return_text


Line 18: Line 16:
default
default
{
{
        on_rez(integer start_param)
    on_rez(integer start_param)
        {
    {
                llResetScript();
        llResetScript();
        }
    }
        state_entry()
    state_entry()
        {
    {
                llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=TRUE",[],"");
        llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=TRUE",[],"");
        }
    }
        logoff()
    logoff()
        {
    {
                llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=FALSE",[],"");
        llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=FALSE",[],"");
        }
    }
}
}
</lsl>
</lsl>
Line 35: Line 33:
|related
|related
|also
|also
|notes=
|comments=
If the simulator crashes, the event still won't get called (nor will [[attach]]). As a way of detecting user disconnect, this doesn't cover all the bases. That said, why should a script be giving this information? A user may not want the script to be able to track them. I consider this to be pretty invasive. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]{{!}}[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 05:07, 17 May 2010 (UTC)
 
I agree with Strife when I say this is very much not needed, in the list of much needed events id consider this to be least needed for the fact that the longer the script the longer it will take the avatar to logoff, and as for now basic 5-10 second timers for online status will do just fine.--[[User:Ugleh Ulrik|Ugleh Ulrik]] 11:43, 17 May 2010 (UTC)
 
I disagree with this reasoning, because updated timers are a HUGE drain on sim resources, and most ways are unreliable as it is. If a sim crashes, most AVATARS don't even know when they go online. Also, an avatar shouldn't have a script if he/she doesn't know what it's going to do. This would not delay logoff, because the viewer could disconnect while the sim finishes what was left for it to finish. I agree with Strife when I say this is very much not needed, in the list of much needed events id consider this to be least needed for the fact that the longer the script the longer it will take the avatar to logoff, and as for now basic 5-10 second timers for online status will do just fine.--[[User:Caerus Karu|Caerus Karu]] 8:40, 22 October 2010 (UTC)
}}
}}

Latest revision as of 12:41, 22 October 2010

Emblem-important-yellow.png LSL Feature Request
The described event does not exist. This article is a feature request.

Description

Event: logoff( ){ ; }

logoff() Sent as a result of the user quitting the Second Life client/viewer


Specification

Currently there is no way to tell if a logs off from Second Life other than a CONSTANT online status check. This impedes the ability of external data services that serve other users as well

Caveats

This function would require another few seconds to execute before the client shuts down in order to execute.


Examples

<lsl> default {

   on_rez(integer start_param)
   {
       llResetScript();
   }
   state_entry()
   {
       llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=TRUE",[],"");
   }
   logoff()
   {
       llHTTPRequest("http://www.example.com/online.php?key="+(string)llGetOwner()+"&online=FALSE",[],"");
   }

} </lsl>

Deep Notes

Signature


Comments

If the simulator crashes, the event still won't get called (nor will attach). As a way of detecting user disconnect, this doesn't cover all the bases. That said, why should a script be giving this information? A user may not want the script to be able to track them. I consider this to be pretty invasive. -- Strife (talk|contribs) 05:07, 17 May 2010 (UTC)

I agree with Strife when I say this is very much not needed, in the list of much needed events id consider this to be least needed for the fact that the longer the script the longer it will take the avatar to logoff, and as for now basic 5-10 second timers for online status will do just fine.--Ugleh Ulrik 11:43, 17 May 2010 (UTC)

I disagree with this reasoning, because updated timers are a HUGE drain on sim resources, and most ways are unreliable as it is. If a sim crashes, most AVATARS don't even know when they go online. Also, an avatar shouldn't have a script if he/she doesn't know what it's going to do. This would not delay logoff, because the viewer could disconnect while the sim finishes what was left for it to finish. I agree with Strife when I say this is very much not needed, in the list of much needed events id consider this to be least needed for the fact that the longer the script the longer it will take the avatar to logoff, and as for now basic 5-10 second timers for online status will do just fine.--Caerus Karu 8:40, 22 October 2010 (UTC)