irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

host.sh (426B)


      1 #!/bin/bash
      2 
      3 trap 'kill $(jobs -p)' EXIT
      4 
      5 mkdir -p host
      6 cd host
      7 
      8 seq 3 | sed 's/^/[#host_test] <hosto!~username@localhost> /' > ref
      9 tail -f /dev/null | ../../irctk -w hosti@localhost \#host_test > heard &
     10 PID=$!
     11 sleep 1
     12 seq 3 | ../../irctk -U "username" -o hosto@localhost \#host_test > /dev/null
     13 sleep 1
     14 kill $PID
     15 # cannot know the exact host that will appear...
     16 diff <(sed 's/![^>]*>/!>/' ref) <(sed 's/![^>]*>/!>/' heard)
     17