I guess it'll work if I can save the currently active world, make the disconnected world active, close it, then return to the inactive world. I'll give it a shot, thanks for the help!
Amended on Mon 23 Feb 2009 05:03 PM (UTC) by Worstje
Message
Try a plugin with:
function OnPluginDisconnect()
DoCommand("Close")
end
I am not sure how this would play if you had multiple windows open though, given the fact it posts messages to the command queue rather than really uses the world object. (In other words - it might just close the active world rather than the one that just disconnected.)
Additionally, to avoid the popup asking you to save, you might want to turn that off in the global configuration.
Edit: I just tested, and my suspicion was correct. It closes the currently active window. A simple timer in world #1 and a bunch of other worlds open which had the focus would one by one close the other worlds until the first world ended up as the one with the focus. As such, this solution will end up shooting in your foot if you use more than one world/window.
Hi, I have been searching for a function to close a world window, but to no avail. Basically, I would like the world window to close automatically upon disconnection. There doesn't seem to be an option for this, so I'm trying to write my own callback function to do this. Are there any better solutions to this? Thanks in advance!
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.