<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/20159" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2016-05-27T16:36:10-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/20159</id>

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-05-27T16:36:10-04:00</updated>

		<published>2016-05-27T16:36:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105045#p105045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105045#p105045"/>
		<title type="html"><![CDATA[help in dns please.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105045#p105045"><![CDATA[
This works very well tcl<br><br>the detail is that only seeks dns nicknames that are in the same channel where is the bot ..<br>example:<blockquote class="uncited"><div>[16:28] &lt;@yhomar&gt; !nickdns MollyRingwald<br>[16:28] &lt;@sedition&gt; MollyRingwald is not on #Beni.</div></blockquote>it is possible to extend its search, to general <br>and if the nickname is not in line. that the bot says<br><strong class="text-strong">nick does not present in the IRC</strong> or <strong class="text-strong">rex does not exist this nick.<br></strong><br><br>the detail this one in the line <strong class="text-strong">196</strong>, <strong class="text-strong">201</strong> and <strong class="text-strong">203</strong><br>this is a big tcl, and it is necessary to correct those two details already mentioned previously.. thanks<div class="codebox"><p>Code: </p><pre><code>##################################### Dns.tcl                    ###### Version 2.5                ###### By Wcc                     ###### wcc@techmonkeys.org        ###### http://www.dawgtcl.com:81/ ###### EFnet #|DAWG|Tcl           #################################################################################################################### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ######################################################################################################################################################### This script preforms dns lookup from the channel or the partyline. ########################################################################################## COMMANDS ########################################################################### DCC ## .dns &lt;host/ip&gt; (Can be changed.)                           ########### Preforms a dns lookup on the specified host or ip address. ########################################################################### PUB ## !nickdns &lt;nick&gt; (Can be changed.)                          ########### Preforms a dns lookup on the specified nick's hostname or  ########### ip address.                                                ########### ---------------------------------------------------------- ########### !dns &lt;host/ip&gt; (Can be changed.)                           ########### Preforms a dns lookup on the specified host or ip address. ##################################################################################################################################### Just load the script, edit the settings, and rehash. #################################################################################################################### Set the required flag to use the dns commands here. ########################################################set dns_setting(flag) "+o"############################## Set the dcc command here. ##############################set dns_setting(dcc_c) "dns"################################## Set the pub dns command here. ##################################set dns_setting(pub_c) "!dns"###################################### Set the pub nickdns command here. ######################################set dns_setting(pubn_c) "!nickdns"#################################### Enable use of bold in DCC chat? ####################################set dns_setting(bold) 1######################################## Prefix "DNS:" in DCC chat messages? ########################################set dns_setting(DNS:) 1##################### Code begins here #####################if {![string match 1.6.* $version]} { putlog "\002DNS:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." }if {[info tclversion] &lt; 8.2} { putlog "\002DNS:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." }bind pub $dns_setting(flag) $dns_setting(pub_c) dns_pubbind pub $dns_setting(flag) $dns_setting(pubn_c) dns_nick_pubbind dcc $dns_setting(flag) $dns_setting(dcc_c) dns_dccproc dns_dopre {} {if {!$::dns_setting(DNS:)} { return "" }if {!$::dns_setting(bold)} { return "DNS: " }return "\002DNS:\002 "}proc dns_dcc {hand idx text} {if {[scan $text "%s" address] != 1} { putdcc $idx "[dns_dopre]Usage: .dns &lt;host/ip&gt;" ; return }dnslookup [split $address] dns_output_dcc $idx [split $address]}proc dns_pub {nick uhost hand chan text} {if {[scan $text "%s" address] != 1} { putserv "PRIVMSG $chan :Usage: !dns &lt;host/ip&gt;" ; return }dnslookup [split $address] dns_output_pub $chan [split $address]}proc dns_nick_pub {nick uhost hand chan text} {if {[scan $text "%s" rnick] != 1} { putserv "PRIVMSG $chan :Usage: !nickdns &lt;nick&gt;" ; return }if {![onchan $rnick $chan]} { putserv "PRIVMSG $chan :$rnick is not on $chan." ; return }set tl [lindex [split [getchanhost $rnick] @] 1] dnslookup $tl dns_output_pub $chan $tl $rnick}proc dns_output_pub {ip host status chan addr {rnick ""}} {if {!$status} { putserv "PRIVMSG $chan :[expr {($rnick != "")?"$rnick's host \($addr\)":"$addr"}] could not be resolved." ; return }set iphost [expr {([string match $ip $addr])?$ip:$host}]putserv "PRIVMSG $chan :[expr {($rnick != "")?"$rnick's host \($iphost\)":"$iphost"}] has been resolved to [expr {([string match $ip $addr])?$host:$ip}]."}proc dns_output_dcc {ip host status idx addr} {if {![valididx $idx]} { return }if {!$status} { putdcc $idx "[dns_dopre]Could not resolve $addr." ; return }putdcc $idx "[dns_dopre][expr {([string match $ip $addr])?$ip:$host}] has been resolved to [expr {([string match $ip $addr])?$host:$ip}]."}putlog "\002DNS:\002 Dns.tcl 2.5 by Wcc is loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Fri May 27, 2016 4:36 pm</p><hr />
]]></content>
	</entry>
	</feed>
