Skip to content

Instantly share code, notes, and snippets.

@nakal
Last active Mar 22, 2016
Embed
What would you like to do?
#!/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