<?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/2775" />

	<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>2002-10-24T10:58:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-24T10:58:15-04:00</updated>

		<published>2002-10-24T10:58:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12296#p12296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12296#p12296"/>
		<title type="html"><![CDATA[Opening a DCC...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12296#p12296"><![CDATA[
No one?  Come on... Please?  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by Guest — Thu Oct 24, 2002 10:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-23T17:15:34-04:00</updated>

		<published>2002-10-23T17:15:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12248#p12248</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12248#p12248"/>
		<title type="html"><![CDATA[Opening a DCC...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12248#p12248"><![CDATA[
Alright... Finally had the time to sit back down and work on this... I have it mostly working... the only thing that I run into is if 2 or more people try to get server status at the same time, it sends the output requested by the first user to the last person that requested it.<br><br>How can I lock it until it is finished sending to one person?  I'm not worried about it keeping the chat open, as I only want it to open the dcc, send the status requested, and kill it.  Any thoughts?<br><div class="codebox"><p>Code: </p><pre><code># Configuration settings:# Public triggerset tr "!"# Flags needed to use the commandsset qstat_flag "-|-"# Path to qstat folder containing qstat stuff/scripts and the qstat programset pathqstat "/home/ircadmin/MonkBOT/qstat"# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):set nopub ""#Set default DCC port for the DCC Chat transfersset qstatport "48000"listen $qstatport script qstat_dcc_postbind pub $qstat_flag ${tr}dservers pub:dserversbind pub $qstat_flag ${tr}dserver1 pub:dserver1...bind pub $qstat_flag ${tr}dserver7 pub:dserver7proc qstat:check_input {text} {  regsub -all {&lt;|&gt;|&amp;|\|/|%|[|]|[$]} $text "" text  return $text}proc pub:dservers {nick host hand chan arg} {  global pathqstat tr nopub stat  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -cfg $pathqstat/qstat.cfg -f $pathqstat/servers.lst -sort l -Ts $pathqstat/servermini.qstat" r]  pub:dqstat_results $nick}proc pub:dserver1 {nick host hand chan arg} {  global pathqstat tr nopub stat  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -cfg $pathqstat/qstat.cfg -uns 204.149.41.5 -sort TF -P -Ts $pathqstat/serverfull.qstat -Tp $pathqstat/players.qstat" r]  pub:dqstat_results $nick}...proc pub:dserver7 {nick host hand chan arg} {  global pathqstat tr nopub stat  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -cfg $pathqstat/qstat.cfg -ut2s 64.246.32.42 -sort TF -P -Ts $pathqstat/serverfull.qstat -Tp $pathqstat/players.qstat" r]  pub:dqstat_results $nick}proc pub:dqstat_results {nick} {  global bot botnick qstatport  putserv "PRIVMSG $nick :\001DCC CHAT chat [myip] $qstatport\001"}proc qstat_dcc_post {idx} {global statputlog "Posting qstat results to $idx"set output_list ""  while {[gets $stat line] &gt;= 0} {    lappend output_list $line  }    if {[string match "DOWN*" [lindex $output_list 0]]} {      putdcc $idx "Connection refused while querying server"      break    } elseif {[string match "HOSTNOTFOUND*" [lindex $output_list 0]]} {      putdcc $idx "Host not found"      break    } elseif {[string match "TIMEOUT*" [lindex $output_list 0]]} {      putdcc $idx "Timeout while querying server"      break    } else {      foreach output_line $output_list {        if {[string index $output_line 0]==0} {          set str [format "%2s | %5s | %6s | %20s" [lindex $output_line 0] [lindex $output_line 1] [lindex $output_line 2] [lindex $output_line 3]]          putdcc $idx "\00304 $str"        } elseif {[string index $output_line 0]==1} {          set str [format "%2s | %5s | %6s | %20s" [lindex $output_line 0] [lindex $output_line 1] [lindex $output_line 2] [lindex $output_line 3]]          putdcc $idx "\00302 $str"        } elseif {[string index $output_line 0]==2} {          set str [format "%2s | %5s | %6s | %20s" [lindex $output_line 0] [lindex $output_line 1] [lindex $output_line 2] [lindex $output_line 3]]          putdcc $idx "\00307 $str -- Spectator"        } else {          putdcc $idx "$output_line"        }      set str ""      }    killdcc $idx    set stat ""    }  putlog "Post of info to $idx finished"  }putlog "dqstat.tcl DCC of QSTAT results script loaded"</code></pre></div><p>Statistics: Posted by Guest — Wed Oct 23, 2002 5:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-12T10:54:02-04:00</updated>

		<published>2002-10-12T10:54:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11912#p11912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11912#p11912"/>
		<title type="html"><![CDATA[Opening a DCC...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11912#p11912"><![CDATA[
I would recomend setting up the litening port before sending the CTCP message. What if the port is allready in use?<br><br>Another method is to use port number 0. Apparently, you can use this to get aggrop to find a port for you, and this port number is used as the retrun value.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sat Oct 12, 2002 10:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spyda]]></name></author>
		<updated>2002-10-11T21:37:19-04:00</updated>

		<published>2002-10-11T21:37:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11895#p11895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11895#p11895"/>
		<title type="html"><![CDATA[Try This]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11895#p11895"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set asus(port) "8000"bind MSG - dcc_chat asus_dccproc asus_dcc {nick uhost hand vasus} {  global asus botnick  ## Do all ya check stuff here##  ## ![validuser $hand] ##  putserv "PRIVMSG $nick :\001DCC CHAT chat [myip] $asus(port)\001"}listen $asus(port) script asus_catchproc asus_catch {idx} {  asus_dcc_window $idx  control $idx asus_dcc_catch}proc asus_dcc_window {idx} {  global botnick  putdcc $idx "Welcome to $botnick Dcc CHAT."  putdcc $idx "All my msgs will be sent in here, so plz keep this window  open while using my services"  putdcc $idx "At any time write /002.help/002 for any help.}proc asus_dcc_catch {idx dcc_catch} {  global botnick  if {[string [split $asus_catch] 0] == ".help"} {   putdcc $idx " $botnick HELP"   putdcc $idx " etc etc...." }}</code></pre></div> I had a script that I wrote for about the same perpose. So with some changes, I hope that helps you out!<br><br> It is not tested. But it looks right. So if I get time in the next 3 days (I wont be online for about a week I think, if I get this new Job!) I will test to make sure that it works and post the bug fix....<br><br>LOL <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> . I looked over it for the last time quickly and I missed the last } in asus_dcc_catch. But I think that is it.<br><br>------------<br>ThePope<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1731">spyda</a> — Fri Oct 11, 2002 9:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-10-11T15:58:54-04:00</updated>

		<published>2002-10-11T15:58:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11887#p11887</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11887#p11887"/>
		<title type="html"><![CDATA[Opening a DCC...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11887#p11887"><![CDATA[
Find a script that makes its own dcc connections, like an fserve. Then borrow the code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Fri Oct 11, 2002 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-10-11T12:08:50-04:00</updated>

		<published>2002-10-11T12:08:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11882#p11882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11882#p11882"/>
		<title type="html"><![CDATA[Opening a DCC...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11882#p11882"><![CDATA[
I must be missing something somewhere...  I have been looking at all the threads in here that talk about opening a dcc chat, but I just don't freaking get it.<br><br>Basically, I am <strong class="text-strong">still</strong> tweaking my qstat code... and I want to give the user the option to have the results sent by dcc (thereby being faster).<br><br>Here is the current code that just uses the standard putserv...<br><div class="codebox"><p>Code: </p><pre><code>pub:qstat_results {nick pf} {  set output_list ""  while {[gets $pf line] &gt;= 0} {    lappend output_list $line  }    if {[string match "DOWN*" [lindex $output_list 0]]} {      putserv "PRIVMSG $nick :Connection refused while querying server"      break    } elseif {[string match "HOSTNOTFOUND*" [lindex $output_list 0]]} {      putserv "PRIVMSG $nick :Host not found"      break    } elseif {[string match "TIMEOUT*" [lindex $output_list 0]]} {      putserv "PRIVMSG $nick :Timeout while querying server"      break    } else {      foreach output_line $output_list {        if {[string index $output_line 1]==0} {          putserv "PRIVMSG $nick :\00304,0 $output_line"        } elseif {[string index $output_line 1]==1} {          putserv "PRIVMSG $nick :\00302,0 $output_line"        } else {          putserv "PRIVMSG $nick :\00301,0 $output_line"        }      }    }  }</code></pre></div>How do I make the bot initiate the DCC to the user (rather than have the user initiate)?  Once how do I make the bot realize that the chat has been accepted and then dump the results?<br><br>Thanks for the help!<p>Statistics: Posted by Guest — Fri Oct 11, 2002 12:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
