Giriş

Orijinalini görmek için tıklayınız : DNS. Tcl


No_FeaR
22 Mart 2015, 11:04
bind pub mnf|oaf !dns resolver_dns

proc resolver_dns {nick uhost hand chan text} {
if {![channel get $chan dns]} { return }
set q [lindex [split $text] 0]
if {[llength $q] eq 0} {
putserv "privmsg $chan :Usage : \002$::lastbind <host/nick>\002"
return 0
}
if {(![string match "*.*" $text]) && ([onchan $text $chan]) \
&& ([regexp -line -- {!?([a-f0-9]{1,4})\:([a-f0-9]{1,4})\:([a-f0-9]{1,4})\:.*$} $q] ne 1)} {
set q [lindex [split [getchanhost [lindex [split $text] 0] $chan] @] 1]
if {[string length $q]} { set text $q }
}
if {([regexp -line -- {!?([\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3})$} $q] ne 0) \
|| ([regexp -line -- {!?([a-f0-9]{1,4})\:([a-f0-9]{1,4})\:([a-f0-9]{1,4})\:.*$} $q] eq 1)} {
putserv "privmsg $chan :Only valid \"host\" or \"nick\" please. k thnx"
return
}
if {[regexp -line -- {!?([\d]{1,3}\.[\d]{1,3}\.[\d]{1,3}\.[\d]{1,3})$} $q] eq 0} {
putserv "privmsg $chan :\00304->\003 [dnslookup $q f]"
}
return
}

proc f {a b c} { if {$c} { return \002$a\002 } { return \002$b\002 }}

setudef flag dns

putlog "ok..."

Yapımcısı ; saywhat