Add a test tool.
[irker.git] / irk
1 #!/bin/sh
2 # Illustrates how to test irkerd.
3 #
4 # First argument must be a channel URL. If it does not begin with "irc", 
5 # the base URL for freenode is prepended.
6 #
7 # Second argument must be a payload string.
8 #
9 channel=$1
10 message=$2
11
12 case $channel in
13 irc:*) ;;
14 *) channel="irc://chat.freenode.net/$channel"
15 esac
16
17 echo "{\"to\":\"$channel\",\"privmsg\":\"$message\"}" | netcat localhost 6659