ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/git-send/trunk/git-send-irc
Revision: 1.1
Committed: Mon Sep 30 00:45:17 2024 UTC (6 weeks, 4 days ago) by yakumo_izuru
Branch: MAIN
Log Message:
Move from Git to CVS

File Contents

# Content
1 #!/bin/sh
2 # $TheSupernovaDuo$
3
4 IRC_PORT="${IRC_PORT:-6667}"
5 IRC_SERVER="${IRC_SERVER:-irc.nishi.boats}"
6
7 die() {
8 printf "[ERROR] %s\n" "$*"
9 exit 1
10 }
11
12 send_message() {
13 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
14 }
15
16 target="$1"
17 message="$(printf "%s" $(minpb -u "$2" https://i.kalli.st))"
18
19 test -z "$target" && die "No target"
20 test -z "$message" && die "No message"
21 send_message "$target" "$message"