#PBC Official Forum  #PBC Official Forum
Noi Iti Protejam Chanu De LAMERI
#PBC Official Forum
FAQFAQ  CautareCautare  InregistrareInregistrare  ProfilProfil  MembriMembri  GrupuriGrupuri  Mesaje privateMesaje private  AutentificareAutentificare 

dns.tcl

 
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
TrAsNeT
Junior 2
Junior 2
TrAsNeT

Data inscrierii: 12/Mai/2008
Mesaje: 44
Localitate: Sighet

MesajTrimis: 14/05/2008 00:18    Titlul subiectului: dns.tcl Raspunde cu citat (quote)

#--------------------------------------------------------
#
# !Dns Version 3.1
# Scripted by I_strike
#
#
# !dns <adresse/host>
# !User@host <nick>
# !dnsnick <nick>
# !amsg <message>
#
# You can chat with me on #egg-world from Undernet
# ( /server quebec.qu.ca.undernet.org )
#
#-------------------------------------------------------

# SET THE CHARACTER THAT WILL BE USED BEFORE PUBLIC QUERRIES
# EXAMPLE: "#" => #seen, #op .... DEFAULT: "!"

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)]User@host pub:host
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 :The User@host of \037\002$dns_nick\017 is \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 :\037\002$arg\017: No such nick." }
}

proc pub:ver {nick uhost hand chan text} {
putserv "PRIVMSG $chan : Dns Resolver 3.1 by I_strike"
}

proc dns:res {nick uhost hand chan text} {
if {$text == ""} {
puthelp "privmsg $chan :Syntax: [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 :Syntax: [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 :Unable to resolve \037\002$hostip\017 ."
} elseif {[regexp -nocase -- $ip $hostip]} {
puthelp "privmsg $chan :DNS resolved \037\002$ip\017 to \037\002$host\017 ."
} else {
puthelp "privmsg $chan :DNS resolved \037\002$host\017 to \037\002$ip\017 ."
}
}

putlog "Dns Resolver 3.1 by I_strike Loaded"
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Raspunde la subiect    Pagina de start a forumului #PBC Official Forum -> TCL Scripts Ora este GMT + 2 ore
Pagina 1 din 1

 
Mergi direct la:  
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro