From c78d7f2e898515d429ec91eaddacc39c40336c3e Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 14 Mar 2014 03:53:32 +0100 Subject: irc-announce: sleep 5 before QUIT --- git/gitolite-hooks/irc-announce | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git/gitolite-hooks/irc-announce b/git/gitolite-hooks/irc-announce index 3230a2b0..5fe50ca3 100755 --- a/git/gitolite-hooks/irc-announce +++ b/git/gitolite-hooks/irc-announce @@ -84,6 +84,8 @@ privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; } | privmsg_cat \ | cat2 + sleep 5 + echo2 'QUIT :Gone to have lunch' printf  -- cgit v1.2.3 From 64b8e353537d2f21eea4531bcae460a1bf14a52b Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 14 Mar 2014 03:55:20 +0100 Subject: irc-announce: use correct channel, again... --- git/gitolite-hooks/irc-announce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/gitolite-hooks/irc-announce b/git/gitolite-hooks/irc-announce index 5fe50ca3..1b356bee 100755 --- a/git/gitolite-hooks/irc-announce +++ b/git/gitolite-hooks/irc-announce @@ -3,7 +3,7 @@ set -euf # CAVEAT we hope that IRC_NICK is unique IRC_NICK="gl$GL_TID" -IRC_CHANNEL='#testing' +IRC_CHANNEL='#retiolum' IRC_SERVER='ire.retiolum' IRC_PORT=6667 -- cgit v1.2.3 From d79aeb890dfbf97c2dd85f48c3fb04d2f07bf066 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 14 Mar 2014 04:04:28 +0100 Subject: irc-announce: PART before QUIT --- git/gitolite-hooks/irc-announce | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git/gitolite-hooks/irc-announce b/git/gitolite-hooks/irc-announce index 1b356bee..394d5261 100755 --- a/git/gitolite-hooks/irc-announce +++ b/git/gitolite-hooks/irc-announce @@ -84,6 +84,9 @@ privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; } | privmsg_cat \ | cat2 + echo2 "PART $IRC_CHANNEL" + + # TESTME does this sleep help to send all messages? sleep 5 echo2 'QUIT :Gone to have lunch' -- cgit v1.2.3 From e6a6809bb14fcc99231358dc3e3b389e451f57d3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 14 Mar 2014 04:17:59 +0100 Subject: irc-announce: make IRC_* configurable --- git/gitolite-hooks/irc-announce | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/git/gitolite-hooks/irc-announce b/git/gitolite-hooks/irc-announce index 394d5261..aa9f91f3 100755 --- a/git/gitolite-hooks/irc-announce +++ b/git/gitolite-hooks/irc-announce @@ -1,11 +1,18 @@ #! /bin/sh set -euf +config_file="$HOME/.local/krebs/irc-announce" +if test -f "$config_file"; then + . "$config_file" +fi + +# XXX when changing IRC_CHANNEL or IRC_SERVER/_PORT, don't forget to update +# any relevant gitolite LOCAL_CODE! # CAVEAT we hope that IRC_NICK is unique -IRC_NICK="gl$GL_TID" -IRC_CHANNEL='#retiolum' -IRC_SERVER='ire.retiolum' -IRC_PORT=6667 +IRC_NICK="${IRC_NICK-gl$GL_TID}" +IRC_CHANNEL="${IRC_CHANNEL-#retiolum}" +IRC_SERVER="${IRC_SERVER-ire.retiolum}" +IRC_PORT="${IRC_PORT-6667}" # for privmsg_cat below export IRC_CHANNEL -- cgit v1.2.3