On my logout link in the relay browser, I see: http://127.0.0.1:60080/KoLmafia/logout?pwd=xxx
That executes the "logout" command and redirects to loggedout.php. I could swear that without that, we were not intercepting the logout and calling your logout script first.
We set up hooks to call the "quit" method - which logs out and then exits - for the following cases:
- The OS X "Quit" menu item that all programs have
- The "Exit KoLmafia" menu item we add to General if you are NOT on OS X
- The "Exit KoLmafia" item we add to the System Tray popup on Windows
- The "exit" command
Apparently, the "x" on a Windows (is it?) frame exits the program, too, and we should probably hook up a handler to that to call the quit method.
Obviously, if you force quit a program or ^C it, we can't intercept that. Actually, we MIGHT be able to intercept a ^C, but I'm not sure we want to.
Edit: OK, I just looked a bit at this. The Windows "X" box just closes the current frame, right? That should use the standard "dispose on close" stuff we do for Java frames, including calling logout when you shut down the last frame. Or am I still confused? When you close the main GUI while logged out and it is your last frame, it takes you back to the Login frame and says it is logging out, right? Or is there some OTHER "x" you press that exits the program without taking you to the Login window?
That executes the "logout" command and redirects to loggedout.php. I could swear that without that, we were not intercepting the logout and calling your logout script first.
What OS is this? Windows?If you just close the window by clicking on the cross button (or otherwise kill the process), you are not getting logged out (and your logout script is not being called).
We set up hooks to call the "quit" method - which logs out and then exits - for the following cases:
- The OS X "Quit" menu item that all programs have
- The "Exit KoLmafia" menu item we add to General if you are NOT on OS X
- The "Exit KoLmafia" item we add to the System Tray popup on Windows
- The "exit" command
Apparently, the "x" on a Windows (is it?) frame exits the program, too, and we should probably hook up a handler to that to call the quit method.
Obviously, if you force quit a program or ^C it, we can't intercept that. Actually, we MIGHT be able to intercept a ^C, but I'm not sure we want to.
Edit: OK, I just looked a bit at this. The Windows "X" box just closes the current frame, right? That should use the standard "dispose on close" stuff we do for Java frames, including calling logout when you shut down the last frame. Or am I still confused? When you close the main GUI while logged out and it is your last frame, it takes you back to the Login frame and says it is logging out, right? Or is there some OTHER "x" you press that exits the program without taking you to the Login window?
Last edited: