Bug - Fixed "Exit KoLmafia" does not invoke logout script or log out.

Bale

Minion
File -> Exit KoLmafia

If I do this it will quit the program without first logging out properly or invoking the logoutScript. This is not KoLmafia's original behavior. I was used to mafia invoking my logout script when I do that. I think that this bug appeared a few days ago.
 

Winterbay

Active member
I would like to think of this as a feature. I've often wanted an option to exit Mafia without running the logout script :)
(I should probably do a better script that is slightly more robust in regards to what I do I guess).

Still, it's an obvious change in behaviour.
 

fronobulax

Developer
Staff member
OK, I just realized what this is about and it is a change. Since I have been using File->Exit for years to shut down mafia, I was surprised when it no longer ran my logout scripts. Since I always shut down mafia between characters and when I am not actively playing, what is the preferred way to run the logout script and then shut down mafia with one mouse operation?
 

charred

Member
i just added
Code:
cli_execute("exit");
to the end of my logout script, so for now ill just run my logout script to shut down mafia
 

Theraze

Active member
But anyone who adds that can no longer switch between characters, because their logout completely exits mafia...

I'd see this as a bug, not a feature. If a command is needed for quitting without running your logoff script, you either shouldn't have an automated logoff script or a new CLI command should be added to enable that capacity.
 

T_E

Member
I'm having this issue, also. To me, it is a bug because the reason I have a script set to run when I log out is so that I do not forget to change into my rollover outfit, equip my disembodied hand (with time sword), and flip to AFHobo. It no longer performs this function for me whilst logging out.
 
Last edited:

fronobulax

Developer
Staff member
But anyone who adds that can no longer switch between characters, because their logout completely exits mafia...

But that is exactly what I want so it's cli_execute("exit"); for me.

Since I am not entirely sure why this was done and whether it was deliberate or a side effect of fixing something else, I will say that I liked things better the way they were before, but won't call it a Bug ;-)
 

charred

Member
But anyone who adds that can no longer switch between characters, because their logout completely exits mafia...

thats what general>logout was for.... we were talking about general>exit

i have my mafias in different folders for each character and always just exited
 

Theraze

Active member
What I was saying there was, if you use multiple characters with the same logout script and logout between them, exitting after the last one, your only options were either adding the exit to your logout script, which made you need to relaunch mafia each time, or logging off and exiting using other options when done.

Academic, since hola rolled back the change that caused this bug. :)
 

Winterbay

Active member
So... Is there now any way of exiting mafia without running a logout-script if you have one set? Or should I go adapt my logout script to not do anything unless told so?
 

Theraze

Active member
Yeah... if in Windows, kill the javaw process, if you want to logout without using the logout script...
 

Bale

Minion
So... Is there now any way of exiting mafia without running a logout-script if you have one set? Or should I go adapt my logout script to not do anything unless told so?

There wasn't any way of exiting mafia without running a logoutScript until the bug was introduced very recently. Now you'll just have to fix your logout script like you should have done in the first place. Either figure out what circumstances should trigger it properly or add user_confirm.
 

Winterbay

Active member
Yeah... if in Windows, kill the javaw process, if you want to logout without using the logout script...

That won't actually log me out though. Well it will when the session times out I guess.

There wasn't any way of exiting mafia without running a logoutScript until the bug was introduced very recently. Now you'll just have to fix your logout script like you should have done in the first place. Either figure out what circumstances should trigger it properly or add user_confirm.

Yes I know that, which is why I wasn't actually against this change. I thought it was rather nice to have a way to exit without running the logout-script (which is mainly when I need to exit Mafia quickly because I have to leave in a hurry). I'll add a user_confirm to my script I think since anticipating every circumstance when I would want the script to fire or not is going to be more work than it's worth.
 
Last edited:

Bale

Minion
Is your problem more complicated than equipping a rollover outfit when you overdrink? Do you want it to sometimes equip for rollover even when you aren't drunk or something like that?

This is me offering help even though the problem might be too subjective.
 

Winterbay

Active member
Well, no not really, the main problem being that I quite often forget to overdrink (because my memory like is full of small round things which you cna poke things through) so that isn't a good point to start :)
But since I generally logout by typing "logout" in the CLI I guess the best option is to make my login-script take an argument and make an alias for logout that takes the same argument and let that decide.
 

Bale

Minion
It sounds like you've got a plan.

It also sounds like your logout script needs to check if you've overdrunk and then user_confirm() if want it to abort since you haven't overdrunk YET.
 
Top