×
Create a new article
Write your page title here:
We currently have 3,185 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,185Articles

    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
    
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.