Instantly show karma change. - 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 74ee7d719d6489e2e95d0ca8ed4adef68f68b7d0 DIR parent d6b26e194f11c162dc6c3b6777a4b15c526429ff HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Mon, 22 Aug 2022 16:26:15 +0200 Instantly show karma change. Diffstat: M annna-message-common | 6 +++++- M karma | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -1137,7 +1137,11 @@ case "${text}" in shame "${shametext}" ;; *++|*--) - karma "${text}" + karmatext="$(karma "${text}")" + if [ -n "$karmatext" ]; + then + annna-say -s "${server}" -c "${channel}" "karma: ${karmatext}" + fi ;; esac DIR diff --git a/karma b/karma @@ -27,6 +27,7 @@ function modifykarma { karmaval=$(getkarmaval "${karmatag}") newkarmaval="$(printf "%d%s\n" "${karmaval}" "$2" | bc)" setkarmaval "${karmatag}" $newkarmaval + printf "%s = %d\n" "$karmatag" "$newkarmaval" } function inckarma {