u may try an if to check if your dialog is already open. Something like

if ($dialog(away2)) /dialg -vie away2 away2
else /dialog -m away2 away2

that would kill any errors u may have when your not immediatly on mirc to close the dialog before another user says "sleep","away",etc