This function could be done using an on text or on noticed function (see help in mirc)once you sent the notice to the client it could set a flag saying your ok to do the disconnect of the client.. then you could do either another notice or text to the client to do the disconnect.
While this is not the code to do the job, it is how it can be done with a little research on your part in the mirc help.
Hope this helps,
HorseC