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

	<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-09-12T06:11:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-09-12T06:11:13-04:00</updated>

		<published>2004-09-12T06:11:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40854#p40854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40854#p40854"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40854#p40854"><![CDATA[
by returning from inside the foreach loop when there's a match, the putserv below will not be executed. Either send the message before you return at that point, keep my code as a separate proc or 'break' out of the loop (if you use break, you'll need code to avoid returning the last line if there's no matches)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Sun Sep 12, 2004 6:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-11T17:16:39-04:00</updated>

		<published>2004-09-11T17:16:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40842#p40842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40842#p40842"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40842#p40842"><![CDATA[
hi,<br><br>who can help me.. ?? The bot (script) find nothing !!<br><br><br>tnx  CoBrEtTi<p>Statistics: Posted by Guest — Sat Sep 11, 2004 5:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-08T13:38:48-04:00</updated>

		<published>2004-09-08T13:38:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40715#p40715</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40715#p40715"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40715#p40715"><![CDATA[
hi,<br><br>tnx arcane for the mistake it is a <strong class="text-strong"> , </strong> and not a <strong class="text-strong">. </strong> i think i need glasses!<br><br>So, but the script find nothing or postet nothing.. and i am a bloody beginner in this code.. so who can help me to make this code runnig.<br><br>In the partyline are no errors!!<br><br><br>tnx <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by Guest — Wed Sep 08, 2004 1:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2004-09-08T12:13:14-04:00</updated>

		<published>2004-09-08T12:13:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40713#p40713</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40713#p40713"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40713#p40713"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>regsub -all {\n{2,}} $data \0 data</code></pre></div></div></blockquote><blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>regsub -all {\n{2.}} $data \0 data</code></pre></div></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Wed Sep 08, 2004 12:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-07T21:20:59-04:00</updated>

		<published>2004-09-07T21:20:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40692#p40692</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40692#p40692"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40692#p40692"><![CDATA[
tnx user for your help..   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br><br>i use now this code:<div class="codebox"><p>Code: </p><pre><code>bind pub - !find pub:findproc pub:find {n h c a text} {set a *[string map  {" " *} $a]set db [open pw.txt]set data [read -nonewline $db]close $dbregsub -all {\n{2.}} $data \0 dataforeach found [split $data \0 ] {  if {[string match *$a* $found]} {    return $found  }   }putserv "PRIVMSG $c :$found"}putlog " i love it "</code></pre></div>and i get this error on my partyline after trigering  for Example !find MGM<br><br><blockquote class="uncited"><div><br>[03:09] Userfile loaded, unpacking...<br>[03:09] Tcl error [pub:find]: couldn't compile regular expression pattern: invalid repetition count(s)<br></div></blockquote>many thx for help... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><p>Statistics: Posted by Guest — Tue Sep 07, 2004 9:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-09-03T10:07:18-04:00</updated>

		<published>2004-09-03T10:07:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40555#p40555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40555#p40555"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40555#p40555"><![CDATA[
try this:<div class="codebox"><p>Code: </p><pre><code>proc findParagraph {file what} {set f [open $file]set data [read -nonewline $f]close $f# replace two or more linebreaks with a nullbyte:regsub -all {\n{2,}} $data \0 data# split the resulting string on those nullbytes and loop through# the blocks of text to find the first matching one and return it.foreach P [split $data \0] {if {[string match *$what* $P]} {return $P}}# if no matches were found, nothing is returned :P}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Fri Sep 03, 2004 10:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-09-02T02:09:15-04:00</updated>

		<published>2004-09-02T02:09:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40532#p40532</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40532#p40532"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40532#p40532"><![CDATA[
hi,<br><br>who can help me ?<br><br>I read the FAQ, in the forum and i use also the search function,<br>but nothing help me, because the post are not in in this example:<br><br>&lt;botnick&gt;line1<br>&lt;botnick&gt;line2<br>&lt;botnick&gt;line3<br>&lt;botnick&gt;line4<br>&lt;botnick&gt;line5<br>.<br>.<br>.<br><br><br>and thats the problem !!<br><br>SO, please help me to get this script runnig!<br><br>Thx<p>Statistics: Posted by Guest — Thu Sep 02, 2004 2:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-08-31T13:40:38-04:00</updated>

		<published>2004-08-31T13:40:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40465#p40465</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40465#p40465"/>
		<title type="html"><![CDATA[search a specific word in a Text file ...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40465#p40465"><![CDATA[
hi @ ll<br><br><br>1. i`m a newbie in tcl coding ...  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> <br>2. my englisch is very very bad.. so  .. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"> <br><br>3.  i spent a lot of time to do a script, that search a specific word in a text file and post specific lines from the text file...<br><br>the text file looks like:<br><br>line1<br>line2<br>line3<br>line4<br><br>line1<br>line2<br>line3<br>line4<br><br><br>the lines are full sentences .... <br><br><br>so.. my problem is that the script that i found it in this forum post me all, and i need that the script post me, from the first line to the last line (line1 to line4), if the specific word is in line1 or line2 or line3 or line4 <br><br>the script what i use is a script coded by IsP .. <br><div class="codebox"><p>Code: </p><pre><code> proc rlslocate {nick uhost handle type arg} { global rlsmaxsearch cd_release rlsinfo if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0} regsub -all -- " " ${arg} "*" rlsarg puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'" set totrlsfound 0 foreach database $cd_release { set rlsfile [open $database r] while {![eof $rlsfile]} { set rlsline [gets $rlsfile] if {[string match "*$rlsarg*" [string tolower $rlsline]]} { incr totrlsfound 1 if {$totrlsfound &lt; $rlsmaxsearch} { puthelp "$type $nick : \002Found:\002 $rlsline" } } } close $rlsfile } ...</code></pre></div>so i think that the problem/ is in this sniped code, if sb need the code i can send a pm..<br><br>thx @ ll for help  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br><br>PS: my own script it doesen`t work like IsP script ..so its much easier to take this script ... i think so  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by Guest — Tue Aug 31, 2004 1:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
