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

	<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-11-30T22:29:07-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-11-30T22:29:07-04:00</updated>

		<published>2005-11-30T22:29:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57854#p57854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57854#p57854"/>
		<title type="html"><![CDATA[File search problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57854#p57854"><![CDATA[
2 questions:<br>- why do you use lrange? it looks pointless in your script, since it a) uses a list operation on a string and b) ignores the first entry. esspially the functionality b) could be the cause of your "little problem" <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br>- why do you escape the *? there is no need to <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. Another tip... if files always have 1 "whitespace" character, you might want to use ? instead of * depending on the exactness the result should be <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Wed Nov 30, 2005 10:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[iNFERiON]]></name></author>
		<updated>2005-11-30T11:40:39-04:00</updated>

		<published>2005-11-30T11:40:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57839#p57839</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57839#p57839"/>
		<title type="html"><![CDATA[File search problem]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57839#p57839"><![CDATA[
I am writing a script that is supposed to search trough a file on the server and check if a string given by the user exists in it, if so, it should output it. So far, with the help of greenbear on IRC I got this:<br><div class="codebox"><p>Code: </p><pre><code>set query [lrange $text 1 end]set query [string map {" " "\*"} $query]set srcdb [open users.txt r]set data [read -nonewline $srcdb]close $srcdbset lines [split $data "\n"]foreach line $lines { if {[string match -nocase "*$query*" $line]} { putmsg $chan $line } else { }}</code></pre></div>However it does not output any results even if I try it with a query I'm 100% sure is in the database. What am I missing here ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5656">iNFERiON</a> — Wed Nov 30, 2005 11:40 am</p><hr />
]]></content>
	</entry>
	</feed>
