Annna now does crystal math every day. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit f243cddefb2a25bce353a3bd832aefa414e51356 DIR parent 55c018349fe429af43677c7749811ada06535f3a HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Thu, 25 May 2023 02:03:22 +0200 Annna now does crystal math every day. Diffstat: M annna-message-common | 5 +++++ A crystal-math | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -594,6 +594,11 @@ case "${text}" in updownword="$(updown "${word}")" annna-say -s "${server}" -c "${channel}" "${word} -> ${updownword}" ;; +"${ircuser}, please crystal math "*) + math="$(printf "%s\n" "${text}" | cut -c 28-)" + crystaluri="$(crystal-math "${math}")" + annna-say -s "${server}" -c "${channel}" "${user}, please see ${crystaluri}" + ;; "${ircuser}, please australize "*) word="$(printf "%s\n" "${text}" | cut -c 26-)" updownword="$(updown "${word}")" DIR diff --git a/crystal-math b/crystal-math @@ -0,0 +1,6 @@ +#!/bin/sh + +export PATH="$HOME/bin:/br/bin:$PATH" + +aamath "$@" | bitreich-paste +