egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help in dns for I_strike

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Arnold_X-P
Master


Joined: 30 Oct 2006
Posts: 221
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Thu Mar 17, 2016 9:28 pm    Post subject: help in dns for I_strike Reply with quote

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:

[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:

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"

_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Master


Joined: 30 Oct 2006
Posts: 221
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Tue Apr 26, 2016 12:08 am    Post subject: Re: help in dns for I_strike Reply with quote

testing options and variants..............................
_________________
Very Happy thanks to that they help, that others learn Very Happy


Last edited by Arnold_X-P on Tue Apr 26, 2016 12:16 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Arnold_X-P
Master


Joined: 30 Oct 2006
Posts: 221
Location: DALnet - Trinidad - Beni - Bolivia

PostPosted: Tue Apr 26, 2016 12:23 am    Post subject: Re: help in dns for I_strike Reply with quote

Solved!

Code:
#--------------------------------------------------------------------------
# !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"

_________________
Very Happy thanks to that they help, that others learn Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber