Originally Posted By: Wims
First, I didn't know /exit wasn't halting the current script, is this intended?


Khaled can probably affirm, but I imagine mIRC is just calling PostQuitMessage here, which means your script has to finish executing for mIRC to go back to the run loop and start the process of exiting the application. In other words, yes, it is intended for exit to not halt your script. You'd want to exit AND halt/return. It would be weird if exit did halt execution, since it's a command, not a control flow keyword like halt or return. The latter two keywords should really be the only way to prematurely end execution of a script.