Just thought I'd point out that you're running into the nick-vs-address issue that affects a lot of things. If someone comes into channel with their away-nick, they'll get a greeting again. If you're wanting to base it on addresses, you could great a named user-level with guser and check it $ulist. Of course that also has the problem of someone's address changing in the future.