Assuming you are using ircv3 and requesting the CAP TAGS
you can do:
on !*:text:*:#: {
if (keyeslol isin $msgtags) {
msg # hi keyeslol
}
}
However, that will answer the nick every time they type anything in chat. Can you be a bit more specific what you are wanting to do?