Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix annna-say for long lines. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit a62e3f5f6fbdb0c4932094de2cc1d6358708586e
parent 4c32a28ff193a33c9b29264f8d12502830c4c85a
Author: Annna Robert-Houdin <[email protected]>
Date: Tue, 26 Dec 2023 23:15:37 +0100
Fix annna-say for long lines.
Diffstat:
M annna-say | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/annna-say b/annna-say
@@ -56,11 +56,16 @@ do
ircpath="${ircbase}/${cserver}/${cname}"
if [ -e "$ircpath/in" ];
then
- printf "%s\n" "$@" > "${ircpath}/in"
+ printf "%s\n" "$@" | fold -w 250 -s > "${ircpath}/in"
else
ircpath="${ircbase}/${cserver}"
# Might be a user.
- printf "/j %s %s\n" "$c" "$@" > "${ircpath}/in"
+ printf "%s\n" "$@" \
+ | fold -w 250 -s \
+ | while read -r line;
+ do
+ printf "/j %s %s\n" "$c" "$line" > "${ircpath}/in"
+ done
fi
done
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.