There isn't a way to find out what their quit message is going to be, that's impossible to the best of my knowledge. You can only detect a quit message after it has been displayed with the 'ON QUIT' event. As a simple example, you could use something like
on *:quit:{
if (*whatever* iswm $1-)
do stuff here
}
Where *whatever* is the bit you want to detect and $1- represents the entire quit message. There must be a op/oper/bot of some description in a common channel with the bot that quits so that their mIRC can pick up the quit message. See
/help on quit.
On the other hand, if you are an IRC Operator and can see every connection that quits, with the quit message, you could use the 'ON SNOTICE' event (Server Notice) to detect quit messages. In essence it's pretty much the same - see
/help on snotice.
As an FYI, scripting questions are best asked in the 'Scripts & Popups' section - this
must be scripted if you are going to go ahead and try and detect them via their quit message, there is not a CTCP or anything to detect the quit message that they may have set in mIRC options or in a script/alias.
Hope this helps
Regards,