1) Look at the
/timer command.
2)
ON *:TEXT:$(* $+ hi $me $+ *):#: {
msg # Hi $nick! :)
}
This will work when someone says 'Hi <yournickname>'.
This method is documented under
/help $(...) from memory.
(Edit: fixed missing } and added the '...' to the help item name)