Add perl feelings to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit c62c9fec4a13413d88e310849ad325b2e3329318 | |
parent 100ffb3a37e4edce739561734d71747445269390 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 24 Jul 2021 19:56:14 +0200 | |
Add perl feelings to annna. | |
Diffstat: | |
M annna-message-common | 7 +++++++ | |
A perl-feelings | 11 +++++++++++ | |
2 files changed, 18 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -268,6 +268,13 @@ case "${text}" in | |
postmortem="$(post-mortem | /br/bin/bitreich-paste)" | |
annna-say -c "${channel}" "${user}, do not feel bad, others had worse … | |
;; | |
+"${botname}, I feel perl.") | |
+ perlfeelings="$(perl-feelings)" | |
+ if [ -n "${perl-feelings}" ]; | |
+ then | |
+ annna-say -c "${channel}" "${user}, I feel ${perlfeelings}" | |
+ fi | |
+ ;; | |
"${botname}, will you be my girlfriend?") | |
rejection="$(girlfriend)" | |
annna-say -c "${channel}" "${user}, ${rejection}" | |
diff --git a/perl-feelings b/perl-feelings | |
@@ -0,0 +1,11 @@ | |
+#!/bin/sh | |
+# | |
+# See: https://www.mcmillen.dev/sigbovik/ | |
+# | |
+ | |
+curl -s https://www.mcmillen.dev/sigbovik/splatters.html \ | |
+ | grep "^<div>" \ | |
+ | grep -v "Not valid" \ | |
+ | sed 's,<div>\([^<]*\)<br><a href="\([^"]*\)".*,\1 = https://www.mcmi… | |
+ | shuf -n 1 | |
+ |