Introduction
Introduction Statistics Contact Development Disclaimer Help
Initial commits for idlerpg modification and new services API. - annna - Annna …
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 315430ad3cb40801566eb1bf9323dd55cec907c8
parent 30cca049385fa396f500ec051f50af0b3522d3c6
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 27 Aug 2023 09:15:33 +0200
Initial commits for idlerpg modification and new services API.
Diffstat:
M annna-channel-service | 17 +++++++++++++----
D annna-message-idle | 25 -------------------------
M annna-stop-services | 1 +
3 files changed, 14 insertions(+), 29 deletions(-)
---
diff --git a/annna-channel-service b/annna-channel-service
@@ -11,9 +11,21 @@ channel="$2"
cfgbase="$(pwd)"
ircbase="$(cat ${cfgbase}/ircbase)"
+ircuser="$(cat ${cfgbase}/${server}/ircuser)"
serverbase="${ircbase}/${server}"
+modbase="$(cat ${cfgbase}/modbase)"
-ls "${serverbase}/${channel}/out" | entr tail -n 1 "${serverbase}/${channel}/o…
+case "${channel}" in
+\#bitreich-idle)
+ idlebase="${modebase}/idlerpg"
+ $idlebase/idlerpg-channel-server.py \
+ "${ircuser}" "${idlebase}" "${ircbase}" "${server}" "${channel…
+ exit $?
+ ;;
+esac
+
+ls "${serverbase}/${channel}/out" \
+ | entr tail -n 1 "${serverbase}/${channel}/out" 2>/dev/null \
| sed -nu 's,[0-9]* <\([^ >]*\)> \(.*\),\1 \2,p' \
| {
while read -r user text;
@@ -25,9 +37,6 @@ do
\#gopherproject)
annna-message-gopherproject "${server}" "${channel}" "${user}"…
;;
- \#bitreich-idle)
- annna-message-idle "${server}" "${channel}" "${user}" "${text}"
- ;;
\#bitreich-wikigame)
annna-message-wikigame "${server}" "${channel}" "${user}" "${t…
;;
diff --git a/annna-message-idle b/annna-message-idle
@@ -1,25 +0,0 @@
-#!/bin/sh -e
-
-export PATH="$HOME/bin:$PATH"
-
-cfgbase="$(pwd)"
-ircbase="$(cat ${cfgbase}/ircbase)"
-modbase="$(cat ${cfgbase}/modbase)"
-idlebase="${modbase}/idlerpg"
-
-server="$1"
-ircuser="$(cat ${cfgbase}/${server}/ircuser)"
-channel="$2"
-user="$3"
-text="$4"
-
-[ "$user" = "${ircuser}" ] && exit
-
-case "${text}" in
-*)
- annna-say -c "${channel}" -s "${server}" "${user}, you will be penaliz…
- ;;
-esac
-
-#annna-message-common "${server}" "${channel}" "${user}" "${text}"
-
diff --git a/annna-stop-services b/annna-stop-services
@@ -2,4 +2,5 @@
pkill -f "entr tail -n 1 /home/annna/irc.*"
pkill -f "annna-channel-service"
+pkill -f "idlerpg-channel-service.py"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.