Add josuah AI support, as proposed in opus 9 of tgtimes. - annna - Annna the ni… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 96cee602f37124888125ec08e2064aac37d4c922 | |
parent 0bd3e4e1da52ab0a81a0184e854bbe5ce061f13d | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Wed, 21 Dec 2022 20:19:45 +0100 | |
Add josuah AI support, as proposed in opus 9 of tgtimes. | |
Diffstat: | |
M annna-message-common | 8 ++++++++ | |
A josuah-ai | 8 ++++++++ | |
2 files changed, 16 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -540,6 +540,14 @@ case "${text}" in | |
;; | |
esac | |
;; | |
+"${ircuser}, is "*) | |
+ aitext="$(printf "%s\n" "${text}" | cut -c 7- | sed 's,\t, ,g')" | |
+ airesult="$(printf "%s\n" "${aitext}" | josuah-ai)" | |
+ if [ -n "${airesult}" ]; | |
+ then | |
+ annna-say -s "${server}" -c "${channel}" "${user},${airesult}" | |
+ fi | |
+ ;; | |
"Ok, ${ircuser}"*) | |
annna-say -s "${server}" -c "${channel}" "${user}, I am not a consumer… | |
;; | |
diff --git a/josuah-ai b/josuah-ai | |
@@ -0,0 +1,8 @@ | |
+#!/bin/sh | |
+# Taken from: | |
+# gopher://bitreich.org/0/tgtimes/archive/2022-10-10/tgtimes-2022-10-10… | |
+# | |
+# Thanks Josuah! | |
+ | |
+sed -r 's/is ([^y]*)\?/absolutely, \1./; s/is (.*y.*)\?/I do not think that \1… | |
+ |