A Simple IP Whois using $com.
With this alias, you can still use /whois command to whois a nickname
;----------------------------------------------------------------------
; Author : bruas aka biase @ Webchat & DalNet, Lite @ KampungChat
; URL : -
; Example : /whois 206.190.36.45
; Description : A Simple IP whois using $com.
;----------------------------------------------------------------------
alias whois {
if ($longip($1)) {
var %e echo $color(whois) $iif($active == Status Window,-s,$active), %h 1, %r
var %a ajax. $+ $upper($regsubex($str(.,10),/./g,$mid($md5($time),$r(1,32),1)))
.comopen %a msxml2.xmlhttp
%e $chr(160)
%e $str($chr(160),16) ---------( $1 )
noop $com(%a,send,$com(%a,open,1,bstr,GET,bstr,$+(http://ipinfo.io/,$1,/json),bool,true)) $com(%a,ResponseText,2)
%r = $remove($replace($remove($com(%a).result,$({,0),$(},0),"),$+($chr(44),$lf),=),$lf)
if ($count(%r,=)) {
while ($gettok(%r,%h,61)) {
%e $str($chr(160),15) $(|,0) $regsubex($v1,(.+):,$+($upper(\1),$str($chr(160),$calc(11-$len(\1))),:))
inc %h
}
}
%e $str($chr(160),16) --------- End Of Whois ----------
%e $chr(160)
.comclose %a
}
else whois $1
}