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

	<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-01-20T19:01:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-20T19:01:15-04:00</updated>

		<published>2003-01-20T19:01:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15579#p15579</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15579#p15579"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15579#p15579"><![CDATA[
[quote="Pyr0"]<div class="codebox"><p>Code: </p><pre><code>     set file [open "|lynx -source http://64.246.38.123:9061/admin.cgi?pass=pass&amp;mode=viewxml" r]      set html $file     set html "[string trimleft html "&lt;AIM&gt;"]"     set html "[string trimright html "&lt;/AIM&gt;"]"     putserv "PRIVMSG $chan : 9,1\[\ \0030Your current DJ:\002 $html \002\0039\]"\</code></pre></div>[quote]<br><br>There are many issues here.<br><br>1: You are using "html" instead of "$html" in the "strign trim*" commands.<br><br>2: You have made the putserv line over complicated, with a mixture of real CTRL characters, excape codes and unrequired escape codes<br><br>3: You are using the return value from the "open" command, to set a variable. You then set "$html" to the same value as returned from "open". The "open" command returns a channel number/file pointer, which is used in command such as read, gets, puts, fconfigure and other socket and file commands.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Jan 20, 2003 7:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-20T17:14:39-04:00</updated>

		<published>2003-01-20T17:14:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15577#p15577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15577#p15577"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15577#p15577"><![CDATA[
hehe I think it would help if you put $ infront of html <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Mon Jan 20, 2003 5:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pyr0]]></name></author>
		<updated>2003-01-20T16:53:44-04:00</updated>

		<published>2003-01-20T16:53:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15576#p15576</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15576#p15576"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15576#p15576"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>     set file [open "|lynx -source http://64.246.38.123:9061/admin.cgi?pass=pass&amp;mode=viewxml" r]      set html $file     set html "[string trimleft html "&lt;AIM&gt;"]"     set html "[string trimright html "&lt;/AIM&gt;"]"     putserv "PRIVMSG $chan : 9,1\[\ \0030Your current DJ:\002 $html \002\0039\]"\</code></pre></div>It returns "html" =/.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2481">Pyr0</a> — Mon Jan 20, 2003 4:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-20T05:35:00-04:00</updated>

		<published>2003-01-20T05:35:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15550#p15550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15550#p15550"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15550#p15550"><![CDATA[
As noted in the reply, use "string trimleft" and "string trimright", and not regsub.<br><br>Regsub uses regular expressions, which can be used for this, but would need escaping.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Jan 20, 2003 5:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pyr0]]></name></author>
		<updated>2003-01-20T00:05:22-04:00</updated>

		<published>2003-01-20T00:05:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15547#p15547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15547#p15547"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15547#p15547"><![CDATA[
if {[string match "&lt;AIM&gt;*" $line]} { <br>                        regsub -all "&lt;AIM&gt;" $line "" line <br>                        regsub -all "&lt;/AIM&gt;" $line "" line <br>                        putserv "PRIVMSG $chan : $line" <br>                } <br><br>I tried that but it didn't work.   Outputted blank if I remember.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2481">Pyr0</a> — Mon Jan 20, 2003 12:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-01-19T20:37:46-04:00</updated>

		<published>2003-01-19T20:37:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15542#p15542</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15542#p15542"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15542#p15542"><![CDATA[
there is several ways of doing this...<br>one is to use lsearch or string match on it,, the pull out the elements...etc<br>another is to use string trim left/right , then you will be left with just the chars between &lt;aim&gt; and &lt;/aim&gt; .... hopefully <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sun Jan 19, 2003 8:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pyr0]]></name></author>
		<updated>2003-01-19T16:30:57-04:00</updated>

		<published>2003-01-19T16:30:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15528#p15528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15528#p15528"/>
		<title type="html"><![CDATA[Grabbing a certain line on a file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15528#p15528"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc dj {nick host hand chan arg} {     global radio_url listener kbps song mlister     set file [open "|lynx http://64.246.38.123:9061/admin.cgi?pass=passgoeshere&amp;mode=viewxml" r]      set html "[gets $file]"</code></pre></div>But I have no clue what to do next.  I want it to grab the 16th line on the xml file which is like &lt;AIM&gt;name&lt;/AIM&gt; and use regsub to remove the &lt;&gt; tags.  But I have no clue on how to grab the 16th line.<br>Any ideas?[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2481">Pyr0</a> — Sun Jan 19, 2003 4:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
