irc-announce: make cat2 more portable:

c9cc1a2d0c
This commit is contained in:
lassulus 2020-01-11 20:28:15 +01:00
parent da62791e10
commit 5281ea1102
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ pkgs.writeDashBin "irc-announce" ''
# echo2 and cat2 are used output to both, stdout and stderr
# This is used to see what we send to the irc server. (debug output)
echo2() { echo "$*"; echo "$*" >&2; }
cat2() { tee /dev/stderr; }
cat2() { (read x ; echo "$x" ; echo "$x" >&2) }
# privmsg_cat transforms stdin to a privmsg
privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; }