Since this is throw-away data, there's no sense in having a special database for it, like hash/ini/text/global vars...

The simplest solution would be to take advantage of /ialmark. I assume for the lifespan a user remains within your ial you only wish to respond ONCE to a specific trigger, like hello. If it is indeed intended to only allow a response every 10 minutes like maroons example, uncomment the last line.

This also circumvents the issue about disk-writes maroon mentioned with using variables. This also addresses an unforseen problem with maroons hash-table example as it does not follow nick changes and would re-trigger if they consistantly change nicknames to ones not logged into the database. By using IAL, this is managed automatically for us!

Code
ON *:TEXT:*Hello*:#:{
  if (!$ialmark($nick,$+($chan,.greeted))) {
    .ialmark -n $nick $+($chan,.greeted) 1
    .timer 1 $rand(2,5) msg $unsafe($chan $nick $+ $chr(44) Hi dude!)

    ;== Uncomment below to make it trigger only once per nick within 600ms...
    ;$+(.timer,$chan,.,$nick) 1 600 .ialmark -rn $nick $+($chan,.greeted)
  }
}

Remember that an IAL entry persists as long as there are common rooms between you and the user. If you want this to re-trigger again if they rejoin from a part/kick and say "hello", you'd want to unset that mark on part/kick as well (in-case they're in more than one common channel, if not, it's un-necessary as it'll naturally get expunged)

You do not have to worry about a part/kick event to unset the mark if you've uncommented that timer (allowing it to always trigger as long as it hasn't been triggered previously by the same user within 10 mins)