The notify function tells you when someone connects to the server. When they have just connected to the server, they aren't on any channels. If you want to perform a whois on them, you should add it in a timer. Something like this perhaps:
on *:NOTIFY:{
if ($nick == [color:red]BOB[/color]) .timer 1 5 whois $nick
}
(untested)
Then you can block the whois raws if you want. There are numerous examples of blocking raws on this site. Just use the search feature.
-genius_at_work