before_logout

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 19:35, 15 July 2016 by Gg (Talk | contribs) (Created page with "{{DISPLAYTITLE:before_logout}} <onlyinclude>Fires when bot is going offline.</onlyinclude> <syntaxhighlight lang="javascript"> Bot.on("before_login", function(event) { ... })...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fires when bot is going offline.

Bot.on("before_login", function(event) { ... });

Reference

This event comes with the following event object:

Variable Required Description
event object properties:
-- none -- Event has no properties

Comments

This event fires right before bot goes offline. Actually, the logout process starts immediately, so you can't interact with Second Life (e.g. send IMs) within this event. However, you can use console.log() and all Bots Playground functionality.

Example

Bot.on("before_logout", function(event) {
	console.log("I'm going offline. See you later.");
});

More complex example can be found here: Logging out and back in