Searched for it but couldn't find anything (even couldn't find numeric answer) so realy sorry if it was somewhere

Now the problem
I've made trivia Bot and i need for some commands to check if user has identified for his nickname, so /whois is not the best way i think

now i've done so that bot performs /whois and saves status window buffer 10 lines and then it checks if there's a line ' $nick has identified for that nickname ' but it takes a time frown

so are there any suggestions?
thanks