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

	<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>2004-05-27T16:03:16-04:00</updated>

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

		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2004-05-27T16:03:16-04:00</updated>

		<published>2004-05-27T16:03:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36649#p36649</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36649#p36649"/>
		<title type="html"><![CDATA[Search after a string an output this PLUS the next 2 lines]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36649#p36649"><![CDATA[
your string match is incorrect... you want:<br><div class="codebox"><p>Code: </p><pre><code>if [string match "*$var*" $creature] {set x 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Thu May 27, 2004 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jagg]]></name></author>
		<updated>2004-05-27T06:29:07-04:00</updated>

		<published>2004-05-27T06:29:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36631#p36631</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36631#p36631"/>
		<title type="html"><![CDATA[Search after a string an output this PLUS the next 2 lines]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36631#p36631"><![CDATA[
Hi,<br><br>i want search a source code after a string like "color=#FF0000&gt;• ". When this string is found the bot should post THIS line (the whole) AND THE NEXT TWO LINES to a channel.<br><br>(This string is in the source code about 3-6 times)<br><br>I've tried that:<div class="codebox"><p>Code: </p><pre><code>bind pub - !test pub:econDproc pub:econD {nick host handle chan text} {set tok [http::geturl http://www.url.com]set data [http::data $tok]set var "color=#FF0000&gt;• "set x 0foreach creature [split $data \n] {if [string match *${creature}* $var] {set x 1}if {$x &gt; 0 &amp;&amp; $x &lt;= 3} {incr xputhelp "PRIVMSG $chan : $creature"}}}</code></pre></div>But this code outputs the whole source code not only the 3 lines when "color=#FF0000&gt;• " were found  <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><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4460">Jagg</a> — Thu May 27, 2004 6:29 am</p><hr />
]]></content>
	</entry>
	</feed>
