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

	<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-28T06:33:05-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-28T06:33:05-04:00</updated>

		<published>2002-10-28T06:33:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12505#p12505</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12505#p12505"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12505#p12505"><![CDATA[
The F: may be the issue, and a method of working around it, has been offered. If you setupt he file locations correctly, there should be no need to have the F:.<br><br>As for "can't duplicate handle". I believe this is a Tcl issue, and has nothing to do with eggdrop (as such). You could possibly contact the Tcl development team, with regards to it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Oct 28, 2002 6:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tainted]]></name></author>
		<updated>2002-10-28T06:05:15-04:00</updated>

		<published>2002-10-28T06:05:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12501#p12501</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12501#p12501"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12501#p12501"><![CDATA[
This is pretty off topic, but does anyone know how to avoid/fix the  "couldn't duplicate input handle: bad file number" error when exec'ing something from a tcl script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1256">tainted</a> — Mon Oct 28, 2002 6:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Black|Man]]></name></author>
		<updated>2002-10-27T21:38:53-04:00</updated>

		<published>2002-10-27T21:38:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12495#p12495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12495#p12495"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12495#p12495"><![CDATA[
I still got this error, is that a problem ? --&gt;  "|F:\<br><div class="codebox"><p>Code: </p><pre><code>!rcwp 195.149.21.61:27960 Tcl error [pub:qstat]: couldn't execute "|F:\windrop\qstat\qstat.exe -rwm 195.149.21.61:27960 -Ts F:\windrop\qstat\server.qstat -Tp F:\windrop\qstat\players.qstat -P": no such file or directory ------------------------------------------------------------------------------------- !rcw 195.149.21.61:27960 Tcl error [pub:qstat]: couldn't execute "|F:\windrop\qstat\qstat.exe -rwm 195.149.21.61:27960 -Ts F:\windrop\qstat\server.qstat": no such file or director</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2091">Black|Man</a> — Sun Oct 27, 2002 9:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-10-27T20:08:43-04:00</updated>

		<published>2002-10-27T20:08:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12493#p12493</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12493#p12493"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12493#p12493"><![CDATA[
<blockquote class="uncited"><div>All of the conventions used in the post so far are valid.<br><br>Both forward slash, and backslash (backslashes need escaping, this is why \\ is used).<br><br>FOr more information regarding Tcl and filename convention see <a href="http://www.tcl.tk/man/tcl8.3/TclCmd/filename.htm#M22" class="postlink">This page</a> (Links direct to windows specific information).</div></blockquote>Just giving a suggestion to try. I know \\ didn't work for me on my windrops, I had to use / ... If it works, great, if not, can't say it wasn't tried. Either way, forward slash would be more efficient since less space is used.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Oct 27, 2002 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-27T19:34:39-04:00</updated>

		<published>2002-10-27T19:34:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12490#p12490</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12490#p12490"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12490#p12490"><![CDATA[
All of the conventions used in the post so far are valid.<br><br>Both forward slash, and backslash (backslashes need escaping, this is why \\ is used).<br><br>FOr more information regarding Tcl and filename convention see <a href="http://www.tcl.tk/man/tcl8.3/TclCmd/filename.htm#M22" class="postlink">This page</a> (Links direct to windows specific information).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Oct 27, 2002 7:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2002-10-27T18:57:19-04:00</updated>

		<published>2002-10-27T18:57:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12489#p12489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12489#p12489"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12489#p12489"><![CDATA[
Try using forward slash (/) instead of backslash (\) in your path names.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sun Oct 27, 2002 6:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-27T17:21:17-04:00</updated>

		<published>2002-10-27T17:21:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12484#p12484</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12484#p12484"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12484#p12484"><![CDATA[
OK, some of the following sugestions, should be used.<br><br>From what I hear, Tcl has issues when traversing directories under windows.<br><br>One way to get around this, is omthing like the following.<br><br>This will assume your bot is in "F:\winbot\".<br><br>Place the qstat programs and files in a directory called "F:\winbot\qstat\". This may be what you have allready, but, this I am not aware of.<br><br>Now set the value of of the path to "qstat\\".<br><br>This should be enough for the script, to process the files.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Oct 27, 2002 5:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Black|Man]]></name></author>
		<updated>2002-10-27T10:21:51-04:00</updated>

		<published>2002-10-27T10:21:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12463#p12463</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12463#p12463"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12463#p12463"><![CDATA[
Yes everything is in the right directory<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2091">Black|Man</a> — Sun Oct 27, 2002 10:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-27T09:24:09-04:00</updated>

		<published>2002-10-27T09:24:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12460#p12460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12460#p12460"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12460#p12460"><![CDATA[
As it sugests, have you tried making sure you have everything in the right directory?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Oct 27, 2002 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Black|Man]]></name></author>
		<updated>2002-10-27T08:36:46-04:00</updated>

		<published>2002-10-27T08:36:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12459#p12459</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12459#p12459"/>
		<title type="html"><![CDATA[hmmm now i got this]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12459#p12459"><![CDATA[
Now i got this error : <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"> <br><div class="codebox"><p>Code: </p><pre><code>!rcwp 195.149.21.61:27960Tcl error [pub:qstat]: couldn't execute "|F:\windrop\qstat\qstat.exe -rwm 195.149.21.61:27960 -Ts F:\windrop\qstat\server.qstat -Tp F:\windrop\qstat\players.qstat -P": no such file or directory-------------------------------------------------------------------------------------!rcw 195.149.21.61:27960Tcl error [pub:qstat]: couldn't execute "|F:\windrop\qstat\qstat.exe -rwm 195.149.21.61:27960 -Ts F:\windrop\qstat\server.qstat": no such file or director</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2091">Black|Man</a> — Sun Oct 27, 2002 8:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-10-27T07:44:17-04:00</updated>

		<published>2002-10-27T07:44:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12454#p12454</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12454#p12454"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12454#p12454"><![CDATA[
For one, you should use<br><br>F:\\windrop\\qstat\\<br><br>Rather than your current setting.<br><br>Beyond that, a little more help on your part would not go amiss.<br><br>WHat errors are you getting.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sun Oct 27, 2002 7:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Black|Man]]></name></author>
		<updated>2002-10-27T20:59:03-04:00</updated>

		<published>2002-10-26T23:14:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=12438#p12438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=12438#p12438"/>
		<title type="html"><![CDATA[Pls help me with this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=12438#p12438"><![CDATA[
need help to get this script to run in windows with windrop  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> <br><div class="codebox"><p>Code: </p><pre><code># qstat.tcl / qstat script for an eggdrop / version 2.1 / 26/10/2002 # # This script will query gameservers using the qstat program to# display server status and players using public commands. ## History:#  1.0 (original) by Mikael Blomqvist &lt;micke@peachpuff.com&gt;#  1.5 by ST8 &lt;st8@q3f.net&gt; and in part by Ad &lt;ad@contempt.org.uk&gt;#  1.7 by Peter Postma &lt;peterpostma@yahoo.com&gt;#    - security hole fixed. (passing bad arguments to TCL's exec)#    - display players fixed. #  1.8 Peter Postma &lt;peterpostma@yahoo.com&gt;#    - doesn't need a temp file anymore to display player info#    - use regsub for input checking #    - better error checking / error messages#    - lot of clean up#  2.0 by Peter Postma &lt;peterpostma@yahoo.com&gt;#    - very nasty bugs fixed: endless long flood and bad errors#    - wiped out alot code, rewrote the main function#  2.1 by Peter Postma &lt;peterpostma@yahoo.com&gt;#    - support for RTCW, Quake 1#    - installation steps added :^)#    - windrop fix## Installation steps:# 1) Easiest way of installing: put all Qstat related files (players.qstat, #    server.qstat, qstat.tcl, qstat (executable)) into _ONE_ directory.#    A good choice would be something like: /home/name/eggdrop/qstat #    or C:\windrop\qstat# 2) Download the Qstat program from www.qstat.org and install it#    to some directory on your system. # 3) Change the option "set pathqstat "/home/peter/AI/scripts/my/qstat" #    and set it to the path where the Qstat related files are installed.# 4) Make sure the path you've just set also contains the files:#    players.qstat &amp; server.qstat. If not, copy them to that directory.# 5) If you're using windrop then change set the option "set windrop 0" to 1.  # 6) Optionally change some other configuration settings below.# 7) Edit your eggdrop's configuration file and add the qstat.tcl script. #    If you don't how to do this, please RTFM :)# 8) Rehash# 9) Typ !qstat in the channel for a command list.## Configuration settings:# Flags needed to use the commandsset qstat_flag "-|-"# Path to qstat folder containing qstat stuff/scripts and the qstat programset pathqstat "F:/windrop/qstat/"# Channels you _dont_ want the bot to reply to public triggers on # (seperate with spaces):set nopub ""# If you're using windrop, set this option to 1, otherwise leave it 0.set windrop 1# End configuration settings################################################################# This is where the evil TCL code starts, read at your peril!  #################################################################set qversion "2.1"bind pub $qstat_flag "!ut"  pub:qstatbind pub $qstat_flag "!hl"  pub:qstat bind pub $qstat_flag "!cs"  pub:qstatbind pub $qstat_flag "!q1"  pub:qstat bind pub $qstat_flag "!q2"  pub:qstat bind pub $qstat_flag "!q3"  pub:qstat bind pub $qstat_flag "!rcw" pub:qstatbind pub $qstat_flag "!utp"  pub:qstatbind pub $qstat_flag "!hlp"  pub:qstatbind pub $qstat_flag "!q1p"  pub:qstatbind pub $qstat_flag "!q3p"  pub:qstatbind pub $qstat_flag "!q2p"  pub:qstatbind pub $qstat_flag "!rcwp" pub:qstatbind pub $qstat_flag "!qstat" pub:qstat_helpproc pub:qstat_help {nick host hand chan arg} {  global pathqstat nopub  # check if channel is allowed.  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  # output qstat commands / help.  putserv "NOTICE $nick :Qstat commands:"  putserv "NOTICE $nick :\002!q1 / !q2 / !q3 / !ut / !hl / !rcw &lt;ip/host&gt;\002 - Displays status of queried Quake 1/2/3, UT, Half-life and RTCW servers"  putserv "NOTICE $nick :\002!q1 / !q2p / !q3p / !utp / !hlp / !rcwp &lt;ip/host&gt;\002 - Displays all players on queried Quake 1/2/3, UT, Half-life and RTCW servers"  return 0}proc pub:qstat {nick host hand chan arg} {  global lastbind pathqstat nopub windrop  # check if channel is allowed.  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  # only use one argument.  set arg [lindex $arg 0]  # check for input.  if {[string length [string trim $arg]] == 0 || [qstat:input_check $arg] || [qstat:zero_check $arg]} {    putquick "NOTICE $nick :Syntax: $lastbind &lt;ip/host&gt;"    return 0  }  # figure out which command was used.  switch [string tolower $lastbind] {    "!hl"   { set gametype "-hls";  set players 0 }    "!cs"   { set gametype "-hls";  set players 0 }    "!ut"   { set gametype "-uns";  set players 0 }    "!q1"   { set gametype "-qs";   set players 0 }    "!q2"   { set gametype "-q2s";  set players 0 }    "!q3"   { set gametype "-q3s";  set players 0 }    "!rcw"  { set gametype "-rwm";  set players 0 }    "!hlp"  { set gametype "-hls";  set players 1 }    "!utp"  { set gametype "-uns";  set players 1 }    "!q1p"  { set gametype "-qs";   set players 1 }    "!q2p"  { set gametype "-q2s";  set players 1 }    "!q3p"  { set gametype "-q3s";  set players 1 }    "!rcwp" { set gametype "-rwm";  set players 1 }    default {      putquick "NOTICE $nick :Unknown command."      return 0    }  } # run the qstat program. if {$players} { if {$windrop} { set stat [exec "|$pathqstat/qstat.exe $gametype $arg -Ts $pathqstat/server.qstat -Tp $pathqstat/players.qstat -P"] } else { set stat [open "|$pathqstat/qstat $gametype $arg -Ts $pathqstat/server.qstat -Tp $pathqstat/players.qstat -P" r] close $stat } } else { if {$windrop} { set stat [exec "|$pathqstat/qstat.exe $gametype $arg -Ts $pathqstat/server.qstat"] } else { set stat [open "|$pathqstat/qstat $gametype $arg -Ts $pathqstat/server.qstat" r] close $stat } } }# show results.proc qstat:results {chan nick pf} {  while {[gets $pf line] &gt;= 0} {     if {[string match "DOWN*" $line]} {      putquick "NOTICE $nick :Connection refused while querying server."      break    } elseif {[string match "HOSTNOTFOUND*" $line]} {      putquick "NOTICE $nick :Host not found."      break    } elseif {[string match "TIMEOUT*" $line]} {      putquick "NOTICE $nick :Timeout while querying server."      break    }    putquick "PRIVMSG $chan :$line"    }}# check for bad characters, if no check this can be exploited.proc qstat:input_check {text} {  foreach char {"&gt;" "&lt;" "|" "&amp;"} {    if [string match "*$char*" $text] { return 1 }  }  return 0}# a trailing zero leads to an endless flood.proc qstat:zero_check {text} {  if {[string match "0*" $text]} { return 1 }  return 0}putlog "Qstat4Eggdrop version $qversion: Loaded!"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2091">Black|Man</a> — Sat Oct 26, 2002 11:14 pm</p><hr />
]]></content>
	</entry>
	</feed>
