What is it you want to close? mirc? in that case it's exit, the dialog dialog -x dialog-name dialog-name . and query window is
close -m $nick