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

	<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>2009-09-14T15:18:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Lenooxxx]]></name></author>
		<updated>2009-09-14T15:18:40-04:00</updated>

		<published>2009-09-14T15:18:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90251#p90251</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90251#p90251"/>
		<title type="html"><![CDATA[hello]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90251#p90251"><![CDATA[
hey Eazy  <br><br>u use eggdrop or windrop ? i have one windrop bot and i need this script but i dont know how this script work on windrop? plz help me thx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10860">Lenooxxx</a> — Mon Sep 14, 2009 3:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Eazy]]></name></author>
		<updated>2009-03-09T06:01:02-04:00</updated>

		<published>2009-03-09T06:01:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87782#p87782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87782#p87782"/>
		<title type="html"><![CDATA[Qstat4Eggdrop problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87782#p87782"><![CDATA[
If I had paid more attention I would have noticed to use !ut2004p if I want to see player-stats.... !ut2004 does just give server-stat. Stupid me.<br><br>Well, someone knows where I can put the IP directly into the script so I don't have to write the IP all the time?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9959">Eazy</a> — Mon Mar 09, 2009 6:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Eazy]]></name></author>
		<updated>2009-03-08T15:59:41-04:00</updated>

		<published>2009-03-08T15:59:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87769#p87769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87769#p87769"/>
		<title type="html"><![CDATA[Qstat4Eggdrop problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87769#p87769"><![CDATA[
Hi!<br>I'm running a pickup @ quakenet and I found this script: <a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=859" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... oad&amp;id=859</a><div class="codebox"><p>Code: </p><pre><code># $Id: qstat.tcl,v 1.3 2003/06/22 12:43:47 peter Exp $# Qstat script for an eggdrop, version 2.2, 22/06/2003 # # 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;peter@webdeveloping.nl&gt;#    - security hole fixed. (passing bad arguments to TCL's exec)#    - display players fixed. #  1.8 Peter Postma &lt;peter@webdeveloping.nl&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;peter@webdeveloping.nl&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;peter@webdeveloping.nl&gt;#    - support for RTCW, Quake 1#    - installation steps added :^)#    - windrop fix (but still doesn't work perfect)#  2.2 by Peter Postma &lt;peter@webdeveloping.nl&gt;#    - added BF, Gamespy, QW and UT2003.#    - added '-timeout 5' option in qstat exec## 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) Optionally change some other configuration settings below.# 6) Edit your eggdrop's configuration file and add the qstat.tcl script. #    If you don't how to do this, please RTFM :)# 7) Rehash# 8) Typ !qstat in the channel for a command list.# 9) Have fun :)## Configuration settings:# Flags needed to use the commandsset qstat_flag "-|-"# Path to qstat folder containing qstat stuff/scripts and the qstat programset pathqstat "/home/server/Desktop/eggdrop2/scripts/qstat"# Channels you _dont_ want the bot to reply to public triggers on # (seperate with spaces):set nopub ""# End configuration settings################################################################# This is where the evil TCL code starts, read at your peril!  #################################################################set qversion "2.2"bind pub $qstat_flag "!ut"  pub:qstatbind pub $qstat_flag "!hl"  pub:qstat bind pub $qstat_flag "!cs"  pub:qstatbind pub $qstat_flag "!qw"  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 "!bf"  pub:qstatbind pub $qstat_flag "!gs"  pub:qstatbind pub $qstat_flag "!ut2k4"  pub:qstatbind pub $qstat_flag "!ut2004" pub:qstatbind pub $qstat_flag "!utp"  pub:qstatbind pub $qstat_flag "!hlp"  pub:qstatbind pub $qstat_flag "!qwp"  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 "!bfp"  pub:qstatbind pub $qstat_flag "!ut2k4p"  pub:qstatbind pub $qstat_flag "!ut2004p" 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!qw / !q1 / !q2 / !q3 / !rcw &lt;ip/host&gt;\002 - Displays status of queried Quake World, 1, 2, 3 or RTCW servers"  putserv "NOTICE $nick :\002!ut / !ut2004 / !hl / !bf / !gs &lt;ip/host&gt;\002 - Displays status of queried UT(2003), Half-life, BF1942 and GameSpy servers"  return 0}proc pub:qstat {nick host hand chan arg} {  global lastbind pathqstat nopub  # 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]} {    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 }    "!qw"     { set gametype "-qws";  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 }    "!bf"     { set gametype "-gps";  set players 0 }    "!gs"     { set gametype "-gps";  set players 0 }    "!ut2k4"  { set gametype "-ut2004s"; set players 0 }    "!ut2004" { set gametype "-ut2004s"; set players 0 }    "!hlp"     { set gametype "-hls";  set players 1 }    "!utp"     { set gametype "-uns";  set players 1 }    "!qwp"     { set gametype "-qws";  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 }    "!bfp"     { set gametype "-gps";  set players 1 }    "!ut2k4p"  { set gametype "-ut2004s"; set players 1 }    "!ut2004p" { set gametype "-ut2004s"; set players 1 }    default {      putquick "NOTICE $nick :Unknown command."      return 0    }  }  # run the qstat program.  if {$players} {     set stat [open "|$pathqstat/qstat -timeout 5 $gametype $arg -Ts $pathqstat/server.qstat -Tp $pathqstat/players.qstat -P" r]  } else {    set stat [open "|$pathqstat/qstat -timeout 5 $gametype $arg -Ts $pathqstat/server.qstat" r]  }  # output the result.  qstat:results $chan $nick $stat  # close fork, end program.  close $stat  return 0}# 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 valid charsproc qstat:input_check {text} {  if {[regexp \[^\[:alnum:\]_\.\:\] $text]} { return 1 }  if {[string match "0*" $text]} { return 1 }  return 0}putlog "Qstat4Eggdrop version $qversion: Loaded!"</code></pre></div>I edited to use UT2004 instead of UT2003. It should display server stats and players, but it only displays server stats. Is there something that I did wrong, or is the script broken? I also thinking if there is any channel flags that might interfere?<br><br>I also wondering if there is a chance that someone like to edit this script so one does not have to write the IP? Was thinking the possibility to set IP's directly into the script, or perhaps in a separate config-file where I can set the commands my selfe (I have 2 UT2004 servers for my pickup):<br>!primary = gives stats for for my primary server<br>!backup = gives stats for my backup server<br><br>Is this possible to do? If I had the scripting skills I had done this my self, but I have a problem with learning :/<br><br>Any kind soul out there?<br>Regards<br>Eazy<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9959">Eazy</a> — Sun Mar 08, 2009 3:59 pm</p><hr />
]]></content>
	</entry>
	</feed>
