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

	<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>2005-01-18T09:22:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Jagg]]></name></author>
		<updated>2005-01-18T09:21:33-04:00</updated>

		<published>2005-01-18T09:21:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45507#p45507</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45507#p45507"/>
		<title type="html"><![CDATA[search txt file problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45507#p45507"><![CDATA[
Ok, works now (corrected code in first post)...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4460">Jagg</a> — Tue Jan 18, 2005 9:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Jagg]]></name></author>
		<updated>2005-01-18T09:22:15-04:00</updated>

		<published>2005-01-18T08:21:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45506#p45506</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45506#p45506"/>
		<title type="html"><![CDATA[search txt file problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45506#p45506"><![CDATA[
Hi,<br><br>i have found a script <a href="http://forum.egghelp.org/viewtopic.php?t=3553" class="postlink">here</a> in the forum to search a txt file line by line and post the results if $arg is in this file.<br><br>My sample txt file looks like<br>---------------------------------<br>boardseek =&gt; <a href="http://any.url.com" class="postlink">http://any.url.com</a><br>help-agent =&gt; this is a text<br>---------------------------------<br><br>I modified it to my needs as shown below and when I search after "board" or "boardseek" i get the correct result "boardseek".<br><br><strong class="text-strong">But when i search after "help" or "help-agent" i get <em class="text-italics">nothing</em></strong>  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> !<br><br>Why?<br><div class="codebox"><p>Code: </p><pre><code># header and copyright......# .....#set cd_release "{./scripts/myfile.txt}"set rlsmaxsearch 10set cmdsearch "!search"set rlsflag ""if {$rlsflag == ""} {set rlsflag "-"}bind pub $rlsflag $cmdsearch pub:rlslocateproc pub:rlslocate {nick uhost handle chan arg} {global rlsmaxsearch cd_releaseif {[lindex $arg 0] == ""} {puthelp "PRIVMSG $chan :Syntax: $cmdsearch &lt;Suchwort&gt;" ;return 0}set totrlsfound 0foreach database $cd_release {  set rlsfile [open $database r]    while {![eof $rlsfile]} {    set rlsline [gets $rlsfile]    if {[string match "*[string tolower [lindex $arg 0]]*" [string tolower $rlsline]]} {    incr totrlsfound 1      if {$totrlsfound &lt; $rlsmaxsearch} {       puthelp "PRIVMSG $chan :$totrlsfound. Teffer: [lindex $rlsline 0]"      }     }    }close $rlsfile}if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$PRIVMSG $chan :$nick: Es gab mehr wie $rlsmaxsearch Treffer. Bitte etwas eingrenzen!"}if {$totrlsfound == "0" } {puthelp "PRIVMSG $chan :$nick: Es gab $totrlsfound Einträge, die deiner Suchanfrage entsprachen."}if {$totrlsfound == "1" } {puthelp "PRIVMSG $chan :$nick: Es gab $totrlsfound Eintrag, der deiner Suchanfrage entsprach."}if {$totrlsfound &gt;= 2 } {puthelp "PRIVMSG $chan :$nick: Es gab $totrlsfound Einträge, die deiner Suchanfrage entsprachen."}}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4460">Jagg</a> — Tue Jan 18, 2005 8:21 am</p><hr />
]]></content>
	</entry>
	</feed>
