Introduction
Introduction Statistics Contact Development Disclaimer Help
Instantly show karma change. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 74ee7d719d6489e2e95d0ca8ed4adef68f68b7d0
parent d6b26e194f11c162dc6c3b6777a4b15c526429ff
Author: Annna Robert-Houdin <[email protected]>
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(-)
---
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
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 {
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.