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

	<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-09-19T12:17:41-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-19T12:17:41-04:00</updated>

		<published>2002-09-19T12:17:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11105#p11105</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11105#p11105"/>
		<title type="html"><![CDATA[TCL newbie needs help on putting a list... Or alternatives..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11105#p11105"><![CDATA[
Yes... that worked.  Like a charm.  One last question...  I found the topic that lists the color codes...  That is a lot of help...<br><br>However, is there something like \n that I can use for a tab (to get even columns)?  Something like \t?<br><br>Where can I find a list of those codes?  And can I put those codes into the array as I reading the qstat output into them?  Qstat uses a template file for the output, and I want to put the tab into the code, so it would be something like<br><div class="codebox"><p>Code: </p><pre><code>$teamnum \t $frags \t $ping \t $playername</code></pre></div>Since the line is sent to the list as a full line, will those tabs (if that is the right code) make it into the list properly?  Or do I need to do something different?<p>Statistics: Posted by Guest — Thu Sep 19, 2002 12:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-19T11:29:08-04:00</updated>

		<published>2002-09-19T11:29:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11095#p11095</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11095#p11095"/>
		<title type="html"><![CDATA[TCL newbie needs help on putting a list... Or alternatives..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11095#p11095"><![CDATA[
3 changes need to be made.<br><br>locate and remove this line<br><div class="codebox"><p>Code: </p><pre><code>set output_line [join $output_list "\n"]</code></pre></div>In each of the [string match] commands below the removed line, you ned to replace the variable $output_line with<br><div class="codebox"><p>Code: </p><pre><code>[lindex $output_list 0]</code></pre></div>IE<div class="codebox"><p>Code: </p><pre><code>string match "DOWN*" $output_line</code></pre></div>should become<div class="codebox"><p>Code: </p><pre><code>string match "DOWN*" [lindex $output_list 0]</code></pre></div>An last, at the base of that script, change the following line:<div class="codebox"><p>Code: </p><pre><code>putquick "PRIVMSG $nick : $output_line"</code></pre></div>To this block.<div class="codebox"><p>Code: </p><pre><code>foreach output_line $output_list {putquick "PRIVMSG $nick : $output_line"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Sep 19, 2002 11:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-19T11:21:22-04:00</updated>

		<published>2002-09-19T11:21:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11093#p11093</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11093#p11093"/>
		<title type="html"><![CDATA[Thanks! So...  Would this work?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11093#p11093"><![CDATA[
Thanks for that info ppslim.  I was figuring I would have to do something like a foreach...  Would this work?  Like I said - I'm pretty new at this.<br><div class="codebox"><p>Code: </p><pre><code>foreach a [lindex $output_line [expr [llength $output_line] -1]] {   puthelp "PRIVMSG $nick :$a" } </code></pre></div><p>Statistics: Posted by Guest — Thu Sep 19, 2002 11:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-19T06:34:31-04:00</updated>

		<published>2002-09-19T06:34:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11083#p11083</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11083#p11083"/>
		<title type="html"><![CDATA[TCL newbie needs help on putting a list... Or alternatives..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11083#p11083"><![CDATA[
This is not due tot he code (as such), but the way in which IRC servers process messages.<br><br>While most people assume, that sending a \n in a line to the server, will force the text on to the next line, this is not true.<br><br>The IRC RFC dictates, that commands sent tot he server, are processed until it reaches a \n, at which point, it's the start of a new command.<br><br>IE, sending<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG #help :hello1\nPRIVMSG #help :hello2"</code></pre></div>is the same as<div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG #help :hello1"putserv "PRIVMSG #help :hello2"</code></pre></div>From what I remember, the RFC dictates that either a line-feed or a newline character dictates the end of a line.<br><br>The only way, is to use, multiple putserv (or equivilant) commands.<br><br>In this situation, you could loop through the list with foreach, and output the entire list.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Sep 19, 2002 6:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-19T06:01:43-04:00</updated>

		<published>2002-09-19T06:01:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11082#p11082</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11082#p11082"/>
		<title type="html"><![CDATA[TCL newbie needs help on putting a list... Or alternatives..]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11082#p11082"><![CDATA[
OK...  Maybe I am missing something very fundamental about lists, but I can't for the life of me figure this out.  I am basically modding the qstat4eggdrop.tcl to display it the way I want it displayed, but I'll be damned if I can get it to work right.<br><br>Here's what I have right now:<div class="codebox"><p>Code: </p><pre><code># qstat.tcl - Qstat4Eggdrop version 1.8## Modified for UnrealPlayground by Kingster &lt;kingster@unrealplayground.com&gt;## This script will query halflife, quake 2, quake 3 and UT servers to# display server status and players using the public commands.## Orginal script (1.0) by Mikael Blomqvist &lt;micke@peachpuff.com&gt;# Modified (1.5) by ST8 &lt;st8@q3f.net&gt; and in part by Ad &lt;ad@contempt.org.uk&gt;# Modified again (1.7) by Peter Postma &lt;peterpostma@yahoo.com&gt;#   changes: - security hole fixed. (passing bad arguments to TCL's exec)#            - display players fixed.# Version 1.8 by Peter Postma &lt;peterpostma@yahoo.com&gt;#   changes: - 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## This script requires Qstat! Get it @ http://www.qstat.org# Typ !qstat for a command list.# 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 ""################################################################# This is where the evil TCL code starts, read at your peril!  #################################################################set qversion "1.8"bind pub $qstat_flag ${tr}servers pub:serversbind pub $qstat_flag ${tr}server1 pub:server1bind pub $qstat_flag ${tr}server2 pub:server2bind pub $qstat_flag ${tr}server3 pub:server3proc qstat:check_input {text} {  regsub -all {&lt;|&gt;|&amp;|\|/|%|[|]|[$]} $text "" text  return $text}proc pub:servers {nick host hand chan arg} {  global pathqstat tr nopub  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -f $pathqstat/servers.lst -sort l -Ts $pathqstat/servermini.qstat" r]  pub:qstat_results $nick $stat  close $stat  return 0}proc pub:server1 {nick host hand chan arg} {  global pathqstat tr nopub  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -uns 204.149.41.5 -sort TF -P -Ts $pathqstat/serverfull.qstat -Tp $pathqstat/players.qstat" r]  pub:qstat_results $nick $stat  close $stat  return 0}proc pub:server2 {nick host hand chan arg} {  global pathqstat tr nopub  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -uns 64.246.32.42 -sort TF -P -Ts $pathqstat/serverfull.qstat -Tp $pathqstat/players.qstat" r]  pub:qstat_results $nick $stat  close $stat  return 0}proc pub:server3 {nick host hand chan arg} {  global pathqstat tr nopub  if {[lsearch -exact $nopub [string tolower $chan]] &gt;= 0} {return 0}  set stat [open "|$pathqstat/qstat -uns 64.246.42.102 -sort TF -P -Ts $pathqstat/serverfull.qstat -Tp $pathqstat/players.qstat" r]  pub:qstat_results $nick $stat  close $stat  return 0}proc pub:qstat_results {nick pf} {  set output_list ""  while {[gets $pf line] &gt;= 0} {    lappend output_list $line  }  set output_line [join $output_list "\n"]  if {[string match "DOWN*" $output_line]} {      putquick "PRIVMSG $nick :Connection refused while querying server"      break    } elseif {[string match "HOSTNOTFOUND*" $output_line]} {      putquick "PRIVMSG $nick :Host not found"      break    } elseif {[string match "TIMEOUT*" $output_line]} {      putquick "PRIVMSG $nick :Timeout while querying server"      break    } else {    putquick "PRIVMSG $nick : $output_line"    }  }}</code></pre></div>Basically, my idea was to put the info returned from qstat into a list, separate each line returned from qstat with a \n (set output_line [join $output_list "\n"]) so it would send it to the server as one line but get sent to the requestor in as many lines as it needed...<br><br>Problem is, when it goes to send the line, it only send to where the \n was inserted.  <br><br>I know there has to be a better way to do this...  Can anyone help?  Or am I beyond help?   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"><p>Statistics: Posted by Guest — Thu Sep 19, 2002 6:01 am</p><hr />
]]></content>
	</entry>
	</feed>
