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

	<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-09-25T12:48:43-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-09-25T12:45:19-04:00</updated>

		<published>2006-09-25T12:45:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66669#p66669</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66669#p66669"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66669#p66669"><![CDATA[
Many thanks...<br><br>this code works for me  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><div class="codebox"><p>Code: </p><pre><code>set filepath "/path/to/dirctory"bind pub -|- !find find_procproc find_proc {nick uhost handle channel arg} {  set results [exec find $filepath -iname *[lindex [split $arg] 0 end]*]  if {[llength $results]} {    foreach result $results {      putserv "PRIVMSG $channel :\002$result\002"    }  } else {    putserv "PRIVMSG $channel :\002No results\002"  }}</code></pre></div>Best regards<br>tessa1<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Mon Sep 25, 2006 12:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-09-25T01:46:29-04:00</updated>

		<published>2006-09-25T01:46:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66661#p66661</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66661#p66661"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66661#p66661"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !find find_procproc find_proc {nick uhost handle channel arg} {  set results [glob -nocomplain /home/dj/djpool/*[lrange [split $arg] 0 end]*]  if {[llength $results]} {    foreach result $results {      putserv "PRIVMSG $channel :\002[file tail $result]\002"    }  } else {    putserv "PRIVMSG $channel :Found no results."  }}</code></pre></div>If you want it to state the entire path (no idea why you would want that)<br><br>Change <br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :\002[file tail $result]\002"</code></pre></div>into<br><div class="codebox"><p>Code: </p><pre><code>putserv "PRIVMSG $channel :\002$result\002"</code></pre></div><br>(untested)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Mon Sep 25, 2006 1:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-09-24T15:58:27-04:00</updated>

		<published>2006-09-24T15:58:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66652#p66652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66652#p66652"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66652#p66652"><![CDATA[
Ok...<br><br>concat is false<br><br>i replaced that with exec  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><br><div class="codebox"><p>Code: </p><pre><code>bind pub "-|-" !find find_procproc find_proc {nick uhost handle channel arg} { set num [lindex [split $arg] 0 end] set command [exec find /home/dj/djpool -iname *$num*] set return [eval $command]  foreach output [split $return \n] {  putserv "PRIVMSG $channel :$output" }}</code></pre></div>But don't works because the output begins with /home/blaaaaa...<br><blockquote class="uncited"><div>Tcl error [find_proc]: invalid command name "/home/dj/djpool/H/test.txt"</div></blockquote>Plz help me a little bit <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Best regards<br>tessa1<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Sun Sep 24, 2006 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-09-24T15:33:09-04:00</updated>

		<published>2006-09-24T15:33:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66651#p66651</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66651#p66651"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66651#p66651"><![CDATA[
Hm... something like this?<br><br>Thats untested and i dunno if it works. <br><div class="codebox"><p>Code: </p><pre><code>bind pub "-|-" !find find_procproc find_proc {nick uhost handle channel arg} { set num [lindex [split $arg] 0 end] set command [concat find /home/dj/djpool -iname *$num*] set return [eval $command] foreach output [split $return \n] {  putserv "PRIVMSG $channel :\002$output\002" }}</code></pre></div>Best regards<br>tessa1<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Sun Sep 24, 2006 3:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-09-24T14:57:27-04:00</updated>

		<published>2006-09-24T14:57:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66648#p66648</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66648#p66648"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66648#p66648"><![CDATA[
I know this is the scripts request forum, and you probably want a whole working script. I just thought I'd point out that the manpage for "file" for tcl has an example of a filesearch script (although not specifically for eggdrop output.)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sun Sep 24, 2006 2:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tessa1]]></name></author>
		<updated>2006-09-25T12:48:43-04:00</updated>

		<published>2006-09-24T13:53:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66641#p66641</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66641#p66641"/>
		<title type="html"><![CDATA[[SOLVED] Search for files via Eggdrop]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66641#p66641"><![CDATA[
Hi,<br><br>i need a a small dj-searchscript that displays the path from a file on my shell.<br><br>When i type this in my shell:<blockquote class="uncited"><div>root:~# find /home/dj/djpool -iname "*What is Love*"</div></blockquote>putty displays the following result:<blockquote class="uncited"><div>/home/dj/djpool/H/Haddaway/2nd Edition/Haddaway-00_What is Love.mp3<br>/home/dj/djpool/H/Haddaway/2nd Edition/Haddaway-05_What is Love (Rapino-Brothers-Mix).mp3</div></blockquote>What i want to do, is to display the result in an IRC-Channel when i type<br><br><em class="text-italics">!find what is love</em><br><br>should the bot display:<br><br><em class="text-italics">/home/dj/djpool/H/Haddaway/2nd Edition/Haddaway-00_What is Love.mp3<br><br>/home/dj/djpool/H/Haddaway/2nd Edition/Haddaway-05_What is Love (Rapino-Brothers-Mix).mp3</em><br><br>Best regards<br>tessa1<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6110">tessa1</a> — Sun Sep 24, 2006 1:53 pm</p><hr />
]]></content>
	</entry>
	</feed>
