ID:991995
 
(See the best response by Neo Rapes Everything.)
What happens on Reboot/World Closing?

I am trying to determine what is called, and if it is called. Is Logout called, or are clients already disconnected without calling this? Is Del Mob called? Can I still check a client's mob's variables on logout?

This is all relevant to how I'm looking to handle saves. Thanks for any info!

I know Del() is called for everything, including clients and world. Logout() I'm not so sure about, but is probably still called.
Best response
By default, client/Del() and client/New() calls mob/Logout() and mob/Login() respectively.

Login is called when a client attempts to log in to the game, while Logout() is called after the client has disconnected.

You can check and modify mob's variables on client/Del(), without a previous call to ..(), do it after the variable adjustment.

I would suggest you to handle all player's checks inside client/Del().
client/Del()
.=..()
if(src.mob)
if(src.mob.controlling)
src.mob.controlling:controlled = null
src.mob.controlling=null
world<<"[src] has logged out!"
else return ..()


As NNAAAAHH said, Del() is called for everything, assuming that when client/Del() is called, by default behavior it will call mob/Logout().
Can you explain me what is
.=..()
line for?
It calls the the default implementation of client/Del(), which actually called client.mob.Logout(), kills off the connection to the client etc. He assigns the return value of that (it doesn't have one, I think) to . which is the default variable returned if you don't exit the procedure using return [var].

The call process for logout is:

client/Del() which calls mob/Logout(). The mob.key will still be set to the relevant client in mob/Logout() during this process.

mob/Logout() does nothing, it's very much implemented for you to add code that's mob specific, to tidy up when a client disconnects from their mob representation in the world. If mob.key is null in mob/Logout(), they are not disconnecting from the world entirely, just switching mobs.
mob/Logout() is called for every mob that has a client attached to it, as well as Del() procs for everything in the world, including atom/Del() and client/Del()