This one resolves the real ip from a nick joining the channel where u on with a webchat.xs4all.nl client (ircnet), if there is someone on the channel that uses the webchat the script checks who is the person and publish it (if you want).
alias wch {
if ($1 == on) && (!$istok(%wch,$chan,32)) {
set %wch %wch $chan
echo $color(info) -ta * Hexresolver set ON for $chan
}
elseif ($1 == off) && ($istok(%wch,$chan,32)) {
set %wch $remtok(%wch,$chan,1,32)
echo $color(info) -ta * Hexresolver set OFF for $chan
}
}
alias htd {
var %r = return
if $1 = 0 %r 0 | if $1 = 1 %r 1 | if $1 = 2 %r 2 | if $1 = 3 %r 3
if $1 = 4 %r 4 | if $1 = 5 %r 5 | if $1 = 6 %r 6 | if $1 = 7 %r 7
if $1 = 8 %r 8 | if $1 = 9 %r 9 | if $1 = a %r 10 | if $1 = b %r 11
if $1 = c %r 12 | if $1 = d %r 13 | if $1 = e %r 14 | if $1 = f %r 15
}
alias hxp {
var %j $len($1) | var %k 0
var %l %j | var %m 0
:hc
dec %l 1 | inc %m 1
%k = $calc(%k + $htd($mid($1, %m , 1)) * (16 ^ %l))
if %l = 0 goto hf
goto hc
:hf | return $longip(%k)
}
alias rdns {
var %f = *!*@ $+ $read(dns.txt,$lines(dns.txt)),$&
%g = $ial(%f,0), %e
while (%g) {
var %e = %e $ial(%f,%g)
dec %g
echo -a $1 matching : %e
msg $1 matching : %e
}
}
on *:join:#: {
if (*webchat* iswm $address) && ($istok(%wch,$chan,32)) {
.whois $nick
.timer1 1 1 echo -a $nick = $!read(dns.txt,$lines(dns.txt))
.timer2 1 2 rdns #
}
}
on *:DNS: { .write dns.txt $raddress }
raw 311:*: if ($4 = webchat.xs4all.nl) { .dns $hxp($remove($3 , ~, -, +, ^, _, = )) }
raw 314:*: if ($4 = webchat.xs4all.nl) { .dns $hxp($remove($3 , ~, -, +, ^, _, = )) }
raw 352:*: if ($4 = webchat.xs4all.nl) { .dns $hxp($remove($3 , ~, -, +, ^, _, = )) }
menu channel {
HexResolver
.$iif($istok(%wch,$chan,32),$style(1)) HexResolver #:$iif($istok(%wch,$chan,32),wch off,wch on)
-
}
menu nicklist {
webchat
.$iif(*webchat* iswm $address($1,5),resolve ip): {
.whois $1
.timer1 1 1 echo -a $1 = $!read(dns.txt,$lines(dns.txt))
.timer2 1 2 rdns
}
}