Code: Select all
proc pub_get {nick host hand chan text} {
putserv "NOTICE $nick :Searching for $text. Please stand by..."
set runcmd [exec /usr/local/filebot/search.sh "$text"]
if {[catch $runcmd res]} {
putserv "NOTICE $nick:No matches for $text"
}
putserv "NOTICE $nick :$res"
putlog "$res"
}
Code: Select all
#!/bin/bash
srch="$1"
oput1="/usr/local/filebot/tmp/search$$.lst"
find /mnt/music -name "*$srch*.mp3" > $oput1
fil=`head -1 $oput1`
echo "$fil"
rm -f $oput1
exit
Code: Select all
/mnt/music/C/Collective Soul/Collective Soul - Better Now.mp3
Code: Select all
invalid command name "/mnt/music/C/Collective"