I don't recommend using this kind of scripts if there is not some kind of nick registration service available. What if someone else logs in using the same nick as your friend usually does? On Notify event is a good start but nick's full address should be checked before sending automatically anything. This can be done with /who and parsing of RAW 352 (RPL_WHOREPLY) events. At the moment I'm too busy to write code for that, sorry.