Skip to content

Instantly share code, notes, and snippets.

@nakal
Last active March 22, 2016 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakal/abcc6f8dd510b9f3a7aa to your computer and use it in GitHub Desktop.
Save nakal/abcc6f8dd510b9f3a7aa to your computer and use it in GitHub Desktop.
#!/bin/sh
IRCSERVER="$1"
CHANNEL="$2"
TEXT="$3"
WEECHAT_PID=`pgrep -U weechatuser weechat`
WEECHAT_PIPE="/home/weechatuser/.weechat/weechat_fifo_${WEECHAT_PID}"
if [ -p "$WEECHAT_PIPE" ]; then
echo "irc.$IRCSERVER.$CHANNEL *$TEXT" > "$WEECHAT_PIPE"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment