Add exclamatio module support into annna-message-common. - 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 e6f32ec12007683294f6bca1721847ac94b1f5a3
DIR parent c0655da913f533290a7600cc2c10507b9915e181
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 7 Jan 2023 22:12:34 +0100
Add exclamatio module support into annna-message-common.
Diffstat:
M annna-message-common | 9 ++++++++-
M exclamatio | 1 -
2 files changed, 8 insertions(+), 2 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -221,7 +221,14 @@ esac
case "${text}" in
"${ircuser}"?)
exclamation="$(printf "${text}\n" | sed "s,${ircuser}\(.\),\1,g")"
- annna-say -s "${server}" -c "${channel}" "${user}${exclamation}"
+ exclamationsintime=$(exclamatio "${user}")
+ finalexclamation="${exclamation}"
+ while [ $exclamationsintime -gt 1 ];
+ do
+ finalexclamation="${finalexclamation}${exclamation}"
+ exclamationsintime=$(($exclamationsintime - 1))
+ done
+ annna-say -s "${server}" -c "${channel}" "${user}${finalexclamation}"
;;
*"<3"*)
annna-say -s "${server}" -c "${channel}" "*o.o*"
DIR diff --git a/exclamatio b/exclamatio
@@ -40,7 +40,6 @@ function modifyexclamatio {
exclamatioval=$(getexclamatioval "${exclamatiotag}")
newexclamatioval="$(printf "%d%s\n" "${exclamatioval}" "$2" | bc)"
setexclamatioval "${exclamatiotag}" $newexclamatioval
- printf "%s = %d\n" "$exclamatiotag" "$newexclamatioval"
}
function incexclamatio {