commandToClient(%client, 'MessageBoxOK', %title, %message);
I'm pretty sure there is a 5th argument that lets you do a callback, if they choose to press OK instead of X.
Like so:
commandToClient(%client, 'MessageBoxOK', %title, %message, 'ConfirmMessage');
function serverCmdConfirmMessage(%client)
{
// Code here.
}
You'd have to try it out, I can't say for certain.