This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
Arnold_X-P
Master
Posts: 226 Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:
Post
by Arnold_X-P » Thu Mar 17, 2016 9:28 pm
tcl errors detected in the dns
It takes too long to solve
and there is an error when I ask dns a nickname that is not online channel and throws as well follows the same mistake
someone please help me to resolve the error: <@JulieThy> #santacruz: No such nick ?? please
Code: Select all
[10:47] <ddr> !dnsnick der
[10:47] <@JulieThy> der: No such nick
[10:48] <ddr> !dnsnick dmd
[10:48] <@JulieThy> User@host dmd is *!*znfly@computer.com
[10:49] <@JulieThy> Unable to resolve computer.com
[10:55] <@JulieThy> #santacruz: No such nick
[12:08] <@JulieThy> #santacruz: No such nick
[12:16] <@JulieThy> #santacruz: No such nick
[12:24] <@JulieThy> #santacruz: No such nick
[12:32] <@JulieThy> #santacruz: No such nick
[12:40] <@JulieThy> #santacruz: No such nick
[12:48] <@JulieThy> #santacruz: No such nick
[12:56] <@JulieThy> #santacruz: No such nick
[13:04] <@JulieThy> #santacruz: No such nick
[13:12] <@JulieThy> #santacruz: No such nick
[13:20] <@JulieThy> #santacruz: No such nick
[13:28] <@JulieThy> #santacruz: No such nick
[13:36] <@JulieThy> #santacruz: No such nick
Code: Select all
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 n|n [string trim $dnshost(cmdchar)]ame pub:ame
bind pub - [string trim $dnshost(cmdchar)]whois pub:host
bind pub - [string trim $dnshost(cmdchar)]dnsver 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 :User@host $dns_nick is $dns_host" }
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 text} {
global dns_chan
set offnick "[lindex $text 1]"
foreach dns_say $dns_chan { putserv "PRIVMSG $dns_say :\037\002$offnick\017: No such nick"
}
return 0
}
proc pub:ver {nick uhost hand chan text} {
putserv "PRIVMSG $chan : Dns Resolver 3.1 by I_strike"
}
proc pub:ame {nick uhost hand chan rest} {
set arg "[lrange $rest 0 end]"
foreach ame [channels] { puthelp "PRIVMSG $ame :\001ACTION $rest\001" }
return 0
}
proc pub:amsg {nick uhost hand chan rest} {
set rest "[lrange $rest 0 end]"
foreach amsg [channels] { puthelp "PRIVMSG $amsg :$rest" }
return 0
}
proc dns:res {nick uhost hand chan text} {
global dnshost
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 $hostip"
} elseif {[regexp -nocase -- $ip $hostip]} {
puthelp "privmsg $chan :$ip resolve $host"
} else {
puthelp "privmsg $chan :$host resolve $ip"
}
}
putlog "Dns Resolver 1.0 by straice Loaded"
Arnold_X-P
Master
Posts: 226 Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:
Post
by Arnold_X-P » Tue Apr 26, 2016 12:08 am
testing options and variants..............................
Last edited by
Arnold_X-P on Tue Apr 26, 2016 12:16 am, edited 1 time in total.
Arnold_X-P
Master
Posts: 226 Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:
Post
by Arnold_X-P » Tue Apr 26, 2016 12:23 am
Solved!
Code: Select all
#--------------------------------------------------------------------------
# !Dns Version v3.1.5 by I_strike - Updated by Arnold_X-P my nicks in DALnet Arnold_X-P & sedition
# email: urquizoandrade@gmail.com /server irc.dal.net #tcls #lapaz
# Commands:
# !dns <adresse/host>
# !User@host <nick>
# !dnsnick <nick>
# !amsg <message>
# !ame <message>
# !dnsver
#-------------------------------------------------------
# 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 n|n [string trim $dnshost(cmdchar)]ame pub:ame
bind pub - [string trim $dnshost(cmdchar)]whois pub:host
bind pub - [string trim $dnshost(cmdchar)]dnsver 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 { putserv "PRIVMSG $dns_say :User@host \2$dns_nick\2 is \2$dns_host\2" }
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 keyword text} {
global dns_chan
if {[info exists dns_chan]} {
set offnick [lindex [split $text] 1]
putserv "PRIVMSG $dns_chan :\2$offnick\2 No such nick."
unset -nocomplain -- dns_chan ;
}
}
proc pub:ver {nick uhost hand chan text} {
putserv "PRIVMSG $chan :\2Dns\2 Resolver \2v3.1.5 by I_strike\2..Updated by \2Arnold_X-P\2 dalnet"
}
proc pub:ame {nick uhost hand chan rest} {
set arg "[lrange $rest 0 end]"
foreach ame [channels] { puthelp "PRIVMSG $ame :\001ACTION $rest\001" }
return 0
}
proc pub:amsg {nick uhost hand chan rest} {
set rest "[lrange $rest 0 end]"
foreach amsg [channels] { puthelp "PRIVMSG $amsg :$rest" }
return 0
}
proc dns:res {nick uhost hand chan text} {
global dnshost
if {$text == ""} {
puthelp "privmsg $chan :Syntax: \2[string trim $dnshost(cmdchar)]dns <host or ip>\2"
} 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: \2[string trim $dnshost(cmdchar)]dnsnick <nick>\2"
} else {
set dns_chan "$chan"
set dns_bynick "oui"
putserv "WHOIS [lindex $arg 0]" -next
}
}
proc resolve_rep {ip host status chan hostip} {
if {!$status} {
puthelp "privmsg $chan :Unable to resolve \2$hostip\2" -next
} elseif {[regexp -nocase -- $ip $hostip]} {
puthelp "privmsg $chan :\2$ip\2 resolve \2$host\2" -next
} else {
puthelp "privmsg $chan :\2$host\2 resolve \2$ip\2" -next
}
}
putlog "Dns Resolver v3.1.5 by I_strike Loaded ..Updated by Arnold_X-P dalnet"