To further improve your suggestion, Fuzionx, regex is well suited for this operation:
on $*:text:$(/(^| )(\Q $+ $replacecs($me,\E,\E\\E\Q) $+ \E|^!page)( |$)/Si):#:{
if ($away) {
if ($regml(2) == !page) { query $me $nick said $strip($2-) at $time $date | halt }
.notice $nick Sorry $nick but I am away. Reason: $awaymsg $+ . Leave a message if you want.
}
}
Two text events are combined as one, and the control codes are stripped out because of the /S modifier. Some people like to use color, bold, or underline embedded text, and if your mIRC is not set to strip incoming messages, the trigger for $me and !page will not respond at all.