putserv "whois $target_nick $target_nick" did the trick
Thanks CrazyCat.
Simo +cC its not sutable because not all connection comes from my ircd. I am linked to other hub. Anyway with double target_nick everything is good now.
proc ipcheck {frm key text} {
if {[string match *!*@* $frm] || ![string match -nocase "*client connecting*" $text]} { return }
regexp {:\ ([^ ]+)\s\(([^@]+)@([^\)])+\)\s\[([^\]]+)} $text - unick ident host ip
::pchecker::isvpn $ip $unick
proc isvpn {ip unick}
putquick "PRIVMSG #test33 :$unick *@$ip +7d :$::pchecker::gmsg"