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

	<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>2006-06-14T02:32:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-06-14T02:32:57-04:00</updated>

		<published>2006-06-14T02:32:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63998#p63998</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63998#p63998"/>
		<title type="html"><![CDATA[Search and display.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63998#p63998"><![CDATA[
<blockquote class="uncited"><div>Hi, i am looking for a script that will search within a specified directory for a text file, the search trigger would be $search &lt;name&gt;<br>The bot would then go on to list matching files (max of 10), then the user can type $display filename.txt and the bot would display the contents of the text file in priv message to the user.<br><br>I did search for the script but found nothing Sad<br><br>Any help would be great!</div></blockquote><div class="codebox"><p>Code: </p><pre><code># no / at the end.set folder ~/my/texts/here# triggerset trigger $bind PUB -|- ${trigger}search  pub:searchbind PUB -|- ${trigger}display  pub:spewproc pub:search {n u h c t} {  global folder  set results [lrange [glob -nocomplain $folder/[lindex [split $t] 0]] 0 9];#max of 10 results  if {![llength $results]} {    putserv "NOTICE $n :No results."  } else {    putserv "NOTICE $n :Found [llength $results] results: [join [tail $results]]"  }}proc pub:spew {n u h c t} {  global folder  if {![file exists $folder/[lindex [split $t] 0]]} {    putserv "NOTICE $n :That file doesn't exist."  } else {    set cont [split [read [set fd [open $folder/[lindex [split $t] 0] r]]] \n][close $fd]    foreach line $cont {      putserv "PRIVMSG $n :$line"    }  }}proc tail {list} {  set r ""  foreach i $list {    lappend r [file tail $i]  }  return $r}</code></pre></div>(untested)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Wed Jun 14, 2006 2:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Swinder]]></name></author>
		<updated>2006-06-11T12:03:24-04:00</updated>

		<published>2006-06-11T12:03:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63898#p63898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63898#p63898"/>
		<title type="html"><![CDATA[Search and display.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63898#p63898"><![CDATA[
Anyone intrested in helping out with the script?<br><br>Sorry to post again but i have literally got a week to show my boss that it can all be done via IRC, after a week he not going to bother <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6579">Swinder</a> — Sun Jun 11, 2006 12:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Swinder]]></name></author>
		<updated>2006-06-06T19:09:16-04:00</updated>

		<published>2006-06-06T19:09:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63779#p63779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63779#p63779"/>
		<title type="html"><![CDATA[Search and display.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63779#p63779"><![CDATA[
I am starting like a shop sort of thing but based via IRC, user will be able to search for like CPU and the bot will display a list of 10 CPU's then a user can check out individual CPU's.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6579">Swinder</a> — Tue Jun 06, 2006 7:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2006-06-06T16:46:35-04:00</updated>

		<published>2006-06-06T16:46:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63773#p63773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63773#p63773"/>
		<title type="html"><![CDATA[Search and display.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63773#p63773"><![CDATA[
What's the purpose of this? Soulds like something *warez* related..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 06, 2006 4:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Swinder]]></name></author>
		<updated>2006-06-06T09:20:07-04:00</updated>

		<published>2006-06-06T09:20:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63760#p63760</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63760#p63760"/>
		<title type="html"><![CDATA[Search and display.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63760#p63760"><![CDATA[
Hi, i am looking for a script that will search within a specified directory for a text file, the search trigger would be $search &lt;name&gt;<br>The bot would then go on to list matching files (max of 10), then the user can type $display filename.txt and the bot would display the contents of the text file in priv message to the user.<br><br>I did search for the script but found nothing <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Any help would be great!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6579">Swinder</a> — Tue Jun 06, 2006 9:20 am</p><hr />
]]></content>
	</entry>
	</feed>
