Pages

Saturday, August 27, 2011

DnsNickHost.tcl

#--------------------------------------------------------------------------
# !Dns Version 3.1 Based on Script by g0eZ egGo
# Commands:
#                   !dns <adresse/host>
#                   !host <nick>
#                   !dnsnick <nick>
#                   !amsg <message>
#-------------------------------------------------------
set dnshost(cmdchar) "."
#-----------------please don't CHANGE ANY OF THE FOLLOWING LINES----------------------
bind pub - [string trim $dnshost(cmdchar)]dns dns:res
bind pub n|n [string trim $dnshost(cmdchar)]amsg pub:amsg
bind pub - [string trim $dnshost(cmdchar)]host pub:host
bind pub - [string trim $dnshost(cmdchar)]version pub:ver
bind pub - [string trim $dnshost(cmdchar)]dnsnick dns:nick
bind raw * 311 raw:host
bind raw * 401 raw:fail

set dns_chan ""
set dns_host ""
set dns_nick ""
set dns_bynick ""

proc pub:host {nick uhost hand chan arg} {
global dns_chan
set dns_chan "$chan"
putserv "WHOIS [lindex $arg 0]"
}

proc raw:host {from signal arg} {
global dns_chan dns_nick dns_host dns_bynick
set dns_nick "[lindex $arg 1]"
set dns_host "*!*[lindex $arg 2]@[lindex $arg 3]"
foreach dns_say $dns_chan { puthelp "PRIVMSG $dns_say :!4HoS4t!14 Host-nya03 \037\002$dns_nick\017 14adalah03 \037\002$dns_host\017 ." }
if {$dns_bynick == "oui"} {
                set hostip [split [lindex $arg 3] ]
                dnslookup $hostip resolve_rep $dns_chan $hostip
                set dns_bynick "non"
}
}

proc raw:fail {from signal arg} {
global dns_chan
set arg "[lindex $arg 1]"
foreach dns_say $dns_chan { puthelp "PRIVMSG $dns_say :!4HoS4t!14 \037\002$arg\017 : 03Tidak Ditemukan" }
}

proc pub:ver {nick uhost hand chan text} {
putserv "PRIVMSG $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4>"
}

proc dns:res {nick uhost hand chan text} {
 if {$text == ""} {
            puthelp "privmsg $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4> Used: [string trim $dnshost(cmdchar)]dns <host or ip>"
        } else {
                set hostip [split $text]
                dnslookup $hostip resolve_rep $chan $hostip
        }
}

proc dns:nick {nick uhost hand chan arg} {
global dns_chan dns_bynick dnshost
 if {$arg == ""} {
 puthelp "privmsg $chan :0,4<1,4>1,5 e14g15go14e1z 1,4<0,4> Used: [string trim $dnshost(cmdchar)]dnsnick <nick>"
        } else {
set dns_chan "$chan"
set dns_bynick "oui"
putserv "WHOIS [lindex $arg 0]"
        }
}

proc resolve_rep {ip host status chan hostip} {
        if {!$status} {
                puthelp "privmsg $chan :!4DN4s! 14Tidak Ada Hasil Untuk03 \037\002$hostip\017 ."
        } elseif {[regexp -nocase -- $ip $hostip]} {
                puthelp "privmsg $chan :!4DN4s! 14Hasil untuk03 \037\002$ip\017 14ke03 \037\002$host\017 ."
        } else {
                puthelp "privmsg $chan :!4DN4s! 14Hasil Untuk03 \037\002$host\017 14ke03 \037\002$ip\017 ."
        }
}

putlog "DnS Loaded By g0eZ egGo Successfully"

No comments:

Post a Comment