irssi grep some pattern on history
Solution 1:
There is no such feature in "IRC in general"; IRC is just a protocol for exchanging messages and does not have logging of any kind. So all that depends on the specific client.
In irssi, though, you can do /lastlog user-a
to search for that word.
If you want regexp search, there's /last -regexp
too.