Introduction
Introduction Statistics Contact Development Disclaimer Help
more crimefighting - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit dd675908db057161b0d1bce1ea3a61b86c8003e9
parent 39cf80b3dc7cf15b8b01520e2ca17df52762f4a7
Author: ben <[email protected]>
Date: Mon, 8 Feb 2021 13:13:51 -0500
more crimefighting
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M annna-start-services | 3 ++-
M theyfightcrime | 12 +++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/annna-start-services b/annna-start-services
@@ -245,7 +245,8 @@ annna_common() {
annna-say -c "${channel}" "${user}, ${rejection}"
;;
"${botname}, who fights crime?")
- crimefighter="$(theyfightcrime)"
+ partner=$(echo $brmembers | awk '{for (i = 1; i < NF; i++) pri…
+ crimefighter="$(theyfightcrime ${user} ${partner})"
annna-say -c "${channel}" "${crimefighter}"
;;
"${botname}, please give me a commit message.")
diff --git a/theyfightcrime b/theyfightcrime
@@ -1,3 +1,13 @@
#!/bin/sh
-curl -s https://theyfightcrime.org/ | grep -Eo '[^>]+They fight crime!'
+duo=$(curl -s https://theyfightcrime.org/ | grep -Eo '[^>]+They fight crime!')
+
+if [ $(echo $1 | wc -m) -gt 1 ]; then
+ duo=$(echo $duo | sed "s/He's/$1 is/g")
+fi
+
+if [ $(echo $2 | wc -m) -gt 1 ]; then
+ duo=$(echo $duo | sed "s/She's/$2 is/g")
+fi
+
+echo $duo
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.