Bug Mafia does not gracefully handle calling a .js chatbotScript in the middle of an exceptional error

Irrat

Member
To Reproduce
1. Create an empty javascript file in your scripts folder, then set the property chatbotScript to the path
2. Enter a choice adventure where your choice is set to 0 or an invalid option, I used unbreakable unbrella choice
3. Run ash adv1($location[The Tunnel of L.O.V.E.], 1, "") - I picked the location as you can still go there while drunk and I did not own it.
4. Spammed with errors as the choice is not available
5. Exit mafia to get out of the state

What I expected
The error to print once, then wait for user to continue.

What happened
The error spammed gCLI, holding ESC spammed world peace alongside the error. The error did not stop, forcing me to exit mafia.

What I think is going on
So the exception error prints to mafia's chat, which calls the chatbot script with the sender, message and channel.
Ash handles this fine, but javascript seems to invoke something that throws a new exception which invokes a new exception which..
 
Top