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

	<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>2003-09-15T20:46:58-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Darkj]]></name></author>
		<updated>2003-09-15T20:46:58-04:00</updated>

		<published>2003-09-15T20:46:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27117#p27117</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27117#p27117"/>
		<title type="html"><![CDATA[hlquery.tcl problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27117#p27117"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>putserv "privmsg $chan Server data file ($serverfile) not found"</code></pre></div>needs to be changed to<div class="codebox"><p>Code: </p><pre><code>putserv "privmsg $chan :Server data file ($serverfile) not found"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3459">Darkj</a> — Mon Sep 15, 2003 8:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[smds]]></name></author>
		<updated>2003-09-15T18:26:20-04:00</updated>

		<published>2003-09-15T18:26:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=27110#p27110</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=27110#p27110"/>
		<title type="html"><![CDATA[hlquery.tcl problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=27110#p27110"><![CDATA[
Hi,<br>I downloaded this script a while ago, and only just tried to run it,<br>but when I do I get an error back saying:<br>Tcl error [dq]: can't read "file": no such variable<br>It'd be great if anyone could help, im fairly new to tcl and can't<br>really see the problem, thanks.<br>I tried adding "set file $serverfile" into the dq proc, but it makes another<br>error now:<br>Tcl error [dq]: can not find channel named "./qstat/hlserver.dat"<br><br>Also, I've been trying to figure out how to get it to<br>scan though all the servers in one group (company)<br>and tell me how many people there are on all the servers<br>it would need to add up the taken slots, and then the total<br>available slots, should look something like this on the channel:<br><br>"me: players jolt"<br>"bot: Jolt dod 71 players in 100 slots (6 servers)"<br><br>ive been trying to to this but cant work it out :/<br>The script comes with a .dat file, i'll list its contents after the main script.<br><br>main script:<div class="codebox"><p>Code: </p><pre><code># Requires QStat 2.4e for Unix - Available from www.qstat.org# Configuration Options:# Public command triggerset tr "!"# Path to qstat folder containing qstat programset pathqstat "./qstat/"# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):set nopub ""# Path to server data fileset serverfile "./qstat/hlserver.dat"############################################################################# This is where the BOFH's leave their code. Mess with it at your own risk ############################################################################## Public Bindsbind pub -|- ${tr}queryip hlsbind pub -|- ${tr}query dqbind pub -|- ${tr}queryhelp helpbind pub -|- ${tr}bygamesbind pub -|- ${tr}wireplay oldbind pub -|- ${tr}jolt oldproc help {nick host hand chan arg} {    global url pathqstat tr nopub    if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}    if {$arg == ""} {    putserv "notice $nick :usage: !query company mod"    putserv "notice $nick :or: !query company mod server-number"    putserv "notice $nick :or: !queryip server-ip"    putserv "notice $nick :Valid values for &lt;company&gt;:  bygames jolt wireplay"    putserv "notice $nick :Valid values for &lt;mod&gt;:    putserv "notice $nick :dod (day of defeat)"    return 0    }    }proc old {nick host hand chan arg} {    global url pathqstat tr nopub    if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}    if {$arg == ""} {    putserv "notice $nick :Sorry, that command is not available in this version of hlserver.tcl"    putserv "notice $nick :For help with using this script type: !queryhelp"    return 0    }    }proc hls {nick host hand chan arg} {    global url pathqstat tr nopub    if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}    if {$arg == ""} {    putserv "notice $nick :Usage: ${tr}queryip &lt;IP Address&gt;"    return 0    }    set stat [exec $pathqstat/qstat -hls $arg -old]    putserv "PRIVMSG $chan :$stat"    return 0    }proc dq {nick host hand chan arg} {    global url pathqstat tr nopub serverfile    if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}    set host [lindex $arg 0]    set servertype [lindex $arg 1]    set servernumber [lindex $arg 2]    if {$servernumber == ""} {     set servernumber "all"    }    if { [file exists $serverfile] } { set file [open $serverfile r]     } else {    putserv "privmsg $chan Server data file ($serverfile) not found"    }    set server ""    while { ![eof $file] } {     set server [gets $file]     set xserverhost [lindex $server 0]     set xservertype [lindex $server 2]     set xservernumb [lindex $server 1]     set xserveripad [lindex $server 3]     if {$host == $xserverhost} {      if {$servertype == $xservertype} {       if {$servernumber == $xservernumb} {        set stat [exec $pathqstat/qstat -hls $xserveripad -old]        putserv "privmsg $chan :$stat"       }       if {$servernumber == "all"} {        set stat [exec $pathqstat/qstat -hls $xserveripad -old]        putserv "notice $nick :$stat"       }      }     }    }     }    return 0    }</code></pre></div><br>The server .dat file: (example ip's)<div class="codebox"><p>Code: </p><pre><code>Jolt 1 dod 56.172.18.21:27015Jolt 2 dod 56.172.18.28:27016Jolt 3 dod 57.172.18.18:27017Jolt 4 dod 57.172.18.14:27015Jolt 5 dod 58.172.18.20:27015Jolt 6 dod 58.172.18.10:27016</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3848">smds</a> — Mon Sep 15, 2003 6:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
