/[git-send]/git-send-irc
ViewVC logotype

Annotation of /git-send-irc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations)
Mon Sep 30 00:56:08 2024 UTC (6 weeks, 4 days ago) by nishi
Branch: MAIN
CVS Tags: HEAD
moving files

1 nishi 1.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"

nishi@chaotic.ninja
ViewVC Help
Powered by ViewVC 1.3.0-dev