Content added Content deleted
imported>mutante mNo edit summary |
imported>mutante mNo edit summary |
||
Line 1: | Line 1: | ||
This is my little way of searching through wikipages from [ |
This is my little way of searching through wikipages from [[IRC]] using [[eggdrop]] |
||
<pre> |
<pre> |
||
Line 37: | Line 37: | ||
</pre> |
</pre> |
||
[[Category:IRC]] |
|||
[[Category:Bots]] |
|||
[[Category:Computer]] |
Latest revision as of 14:00, 19 February 2005
This is my little way of searching through wikipages from IRC using eggdrop
a bash script: #/bin/bash tempfile="wikisearch.tmp" echo "`grep -i -R -l -h $1 /var/www/wiki/page/* | cut -d/ -f7 | cut -d. -f1`" > $tempfile wcount=`less $tempfile | wc -l` echo "Found '$1' in $wcount wiki pages. Outputting 1 random hit: http://wiki.s23.org/wiki.pl?`rl -c1 $tempfile` Find the rest on http://wiki.s23.org/wiki.pl?search=$1&dosearch=Go!" and a tcl script: bind pub - !wiki wiki10 proc wiki10 {nick host hand chan text} { set data10 [exec bash -c "/home/kallisti/egg/scripts/wiki.sh $text"]; putlog "$data10"; regsub -all { } $data10 {} data11; putserv "PRIVMSG $chan :$data11"; } Now you can do a: !wiki <keyword> on any channel with "Kallisti". Example: <@mutante> !wiki mutante <@Kallisti> Found 'mutante' in 195 wiki pages. Outputting 1 random hit: http://wiki.s23.org/wiki.pl?InterFace