It will return your away time, if you are set to away. It will return 0secs when you are not away. This should provide the info you need to fix your script.
Instead of using the %away.reason identifier you could use away $2- and then use the $awaymsg identifier to return your away reason. mIRC has most of this stuff built in.