just an fyi: you can convert the integer form of the IP from hex to decimal by using $base():
alias hxp return $longip($base($1, 16, 10))
$base() can be used, in general, to convert between any numeral systems up to and including base 36, wherein the digits used are 0-9 and A-Z.