irc-bot/irc-say
polyfloyd 3d9ad47064 Add timeout to irc-say
- Prevents from indefinetely blocking all scripts that use it.
2016-09-20 23:08:38 +02:00

11 lines
144 B
Bash
Executable file

#!/bin/bash
HOST=127.0.0.1
PORT=31337
if [ $# -eq 0 ]; then
echo "Usage: $0 <message>..."
exit
fi
echo "$*" | nc -w3 "$HOST" "$PORT"