Master-Of-Death, did you test your script's flood protection? By the look of it, you'll still get flooded. The reason being that the %h variable is set every time when your name is called, and your second elseif statement is redundant. If I were you, my approach would be:
on *:TEXT:*:#:{ if (%h) { halt }
elseif ($me isin $1-) && (%away = 1) {
inc -u10 %h
.msg # 9is currently away Reason: %reason Time: $duration($calc($ctime - %time ))
}
}