/help on notice
on 1:NOTICE:*:?:/msg $nick I'm AFK, back in a moment!
This listens for any private notice and responds with the message that you're away from the keyboard.
For more flexibility, you can also use Variables in place of both the matchtext and the channel parameters.