#!/bin/sh # $TheSupernovaDuo$ IRC_PORT="${IRC_PORT:-6667}" IRC_SERVER="${IRC_SERVER:-irc.nishi.boats}" die() { printf "[ERROR] %s\n" "$*" exit 1 } send_message() { printf "PRIVMSG %s :%s\nQUIT" "$1" "$2" | kirc -s "${IRC_SERVER}" -p "${IRC_PORT}" -r "${USER}/git-send-irc" -u git-send-irc -n "${USER}" -x } target="$1" message="$(printf "%s" $(minpb -u "$2" https://i.kalli.st))" test -z "$target" && die "No target" test -z "$message" && die "No message" send_message "$target" "$message"