ircyrano

reenact cyrano de bergerac on an IRC server
git clone https://a3nm.net/git/ircyrano/
Log | Files | Refs | README

run.sh (585B)


      1 #!/bin/bash
      2 
      3 # run on server $1 characters $2 and script $3
      4 
      5 set -x
      6 
      7 while read l; do
      8   C=$(echo "$l" |cut -d ' ' -f1)
      9   N=$(echo "$l" |cut -d ' ' -f2-)
     10   rm -f $C
     11   mkfifo $C
     12   if echo "$C" | grep ER > /dev/null
     13   then
     14     cat $C | ~/irctk/irctk -i 0 -R "$N" -I 99 $C@$1 '#cyrano' > /dev/null &
     15   else
     16     cat $C | ~/irctk/irctk -i 0 -R "$N" -I 99 $C@$1 > /dev/null &
     17   fi
     18   sleep 0.01
     19 done < $2
     20 
     21 set +x
     22 
     23 echo Waiting...
     24 read pause
     25 
     26 cat $3 | while read l; do sleep 1.5; echo "$l";
     27 if echo "$l" | grep '/mode' > /dev/null; then sleep 2; fi ; done |
     28   ./writer `cat $2 | cut -d' ' -f1`