Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind join - * checkident
- proc checkident {n h hand c} {
- if {$nick == $::botnick} {return 0}
- if {[string match "*.html.chat" $h]} {set host "[lindex [split $h "@"] 0]" ;set ip [getiph $host]} else {set ip "[lindex [split $h @] 1]" }
- dnslookup $ip resolve_rep $c $n
- }
- proc iptohex {t} {
- set t1 [lindex [split $t .] 0]
- set t2 [lindex [split $t .] 1]
- set t3 [lindex [split $t .] 2]
- set t4 [lindex [split $t .] 3]
- regsub -all " " $t "" t
- set txta [format {%x%x%x%x} $t1 $t2 $t3 $t4]
- return "$txta"
- }
- proc getiph {t} {
- set txta [format {%d.%d.%d.%d} 0x[string range $t 0 1] 0x[string range $t 2 3] 0x[string range $t 4 5] 0x[string range $t 6 7]]
- return "$txta"
- }
- proc resolve_rep {ip host status c n} {
- set hex [iptohex $ip]
- if {$host != $ip && $host != ""} {
- putquick "PRIVMSG $c :$n ident = $hex -> $ip -> $host"
- } else {
- putquick "PRIVMSG $c :$n ident = $hex -> $ip"
- }
- }
- bind pub n !hex pgethex
- proc pgethex {n u h c t} {
- if {$t == ""} {putquick "notice $n :Ето пример: !hex 84.40.99.41 -> 54286329" }
- putquick "privmsg $c :[iptohex $t]"
- }
- bind pub n !ip pgetip
- proc pgetip {n u h c t} {
- if {$t == ""} {putquick "notice $n :Ето пример: !ip 54286329 -> 84.40.99.41" }
- putquick "privmsg $c :[getiph $t]"
- }
- putlog "\[x\] WebChat IP/DNS by raspi loaded"
Add Comment
Please, Sign In to add comment