Assuming you want it to work in queries (private messages) only the code would be:

Code:
on *:text:!hex2dec &:?:msg $nick hex2dec: $2 = $longip($base($2,16,10))