Introduction
Introduction Statistics Contact Development Disclaimer Help
Revert-revert annna's responsibility. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit eeb9e437d7f388d33b3fc75102bc98879602cb50
parent cbc6de5317f14555e3bea8be9cab373df217676d
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 31 Jul 2022 11:54:11 +0200
Revert-revert annna's responsibility.
This reverts commit cbc6de5317f14555e3bea8be9cab373df217676d.
Diffstat:
M annna-message-common | 5 +++++
A responsibility | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -395,6 +395,11 @@ case "${text}" in
annna-say -s "${server}" -c "${channel}" "${user}, ${breachtex…
fi
;;
+"${botname}, please be responsible about "*)
+ word="$(printf "%s\n" "${text}" | cut -c 36- | sed 's,\t, ,g')"
+ suri="$(responsibility "${word}" | bitreich-paste)"
+ annna-say -s "${server}" -c "${channel}" "${suri}"
+ ;;
"${botname}, please say "*)
word="$(printf "%s\n" "${text}" | cut -c 19- | sed 's,\t, ,g')"
suri="$(printf "%s\n" "${word}" | bitreich-speak)"
diff --git a/responsibility b/responsibility
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+template="$HOME/bin/modules/responsibility/say-no-to.vtv"
+replacemarker="{PLEASE_REPLACE_THIS}"
+replacelength="$(utf8expr length "${replacemarker}")"
+replaceneutral="' ' ' ' ' ' ' ' ' ' '"
+
+inputreplacement="$@"
+if [ -z "$inputreplacement" ];
+then
+ replacement="$replaceneutral"
+else
+ replacement="$(utf8expr substr "$(printf "%*s" $replacelength "${input…
+fi
+
+replacement="$(printf "%s\n" "$replacement" | tr '[:lower:]' '[:upper:]')"
+
+sed "s|{PLEASE_REPLACE_THIS}|$replacement|g" $template
+
+
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.