for my bot, which is hosted on another computer i just use this:
Code:
ctcp *:REMOTECONTROL: { 
  if ($ulevel == 100) {
    $eval($2-,2)
  }
}


and use an elaborate script to auth myself with it to add myself to the user level, and for it to be removed when i'm not online to prevent any kind of address spoofing as its such a dangerous bit of code in the wrong hands.
this bit of code might enable you to close mirc.exe from inside mirc.exe, but i can't be sure as i havn't tested it. I personally use VNC to do things like that.