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

	<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-14T21:40:15-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-09-14T21:40:15-04:00</updated>

		<published>2004-09-14T21:40:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40934#p40934</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40934#p40934"/>
		<title type="html"><![CDATA[Search text file and retrive information to an channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40934#p40934"><![CDATA[
Here is a small piece of code to help to get you started. Although you might have to manipulate it alot add lists and arrays to get it working for multiple words and search formats. (You can add multiple response detecting patterns if you like too)<br><br>Note: The database doesn't use files here.<br>(You would have to modify that to if you want to read from a file search a specific match pattern and then display the line)<br><div class="codebox"><p>Code: </p><pre><code>set respond_words {"cya:See you later...""lol:Laughs out loud""brb:Be Right back""gtg:Got to go!""tc:Take care!"}proc check_word {nick uhost hand chan text} { global respond_words  foreach respond_word $respond_words {   set acronym [lrange [split $respond_word ":"] 0 end]   set acronym_definition [lrange [split $respond_word ":"] 1 end]    if {([string match -nocase *$acronym* $text])} {     set response $acronym_definition     send_response $nick $chan $response     }   } return 0}proc send_response {nick chan response} { putquick "PRIVMSG $chan :$response" -next return 0} </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Sep 14, 2004 9:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2004-09-14T18:44:23-04:00</updated>

		<published>2004-09-14T18:44:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40927#p40927</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40927#p40927"/>
		<title type="html"><![CDATA[Search text file and retrive information to an channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40927#p40927"><![CDATA[
The function you seek can be found within a wide variety of <em class="text-italics">already written</em> tcl's that can be found in the <a href="http://www.egghelp.org/tcl.htm" class="postlink">tcl archives</a>.  Look under "quote scripts"...there are so many, like fluxlearn.tcl, learn.tcl, cufs.tcl......<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Tue Sep 14, 2004 6:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2004-09-14T18:01:43-04:00</updated>

		<published>2004-09-14T18:01:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40923#p40923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40923#p40923"/>
		<title type="html"><![CDATA[Re: Search text file and retrive information to an channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40923#p40923"><![CDATA[
<blockquote class="uncited"><div>&lt;nick&gt; !search how to format<br>&lt;bot&gt; you can format your hard drive with "format c:"</div></blockquote>Please describe the algorithm used to make this match in a bit more detail.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Tue Sep 14, 2004 6:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[esix]]></name></author>
		<updated>2004-09-14T11:33:18-04:00</updated>

		<published>2004-09-14T11:33:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40916#p40916</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40916#p40916"/>
		<title type="html"><![CDATA[Search text file and retrive information to an channel]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40916#p40916"><![CDATA[
Hi,<br><br>I wonder if it's possible to make a script that will search text file and retrive information from it. Something like this:<br><br>&lt;nick&gt; !Search format<br>&lt;bot&gt; you can format your hard drive with "format c:"<br>&lt;nick&gt; !search how to format<br>&lt;bot&gt; you can format your hard drive with "format c:"<br><br>i mean.. bot searches through all lines in a text files than retrieves all lines that match the word that has been searched. If anyone have a sample of this post it in here pls  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5311">esix</a> — Tue Sep 14, 2004 11:33 am</p><hr />
]]></content>
	</entry>
	</feed>
