Introduction
Introduction Statistics Contact Development Disclaimer Help
Add annna-cmd command. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit d01cfe61b4374d5b6a55347f4b9f6f7ffa165a07
parent fe32740636247c579ee2a208ce9920dde7d73575
Author: Annna Robert-Houdin <[email protected]>
Date: Tue, 26 Dec 2023 23:31:13 +0100
Add annna-cmd command.
Diffstat:
A annna-cmd | 2 ++
M annna-say | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/annna-cmd b/annna-cmd
@@ -0,0 +1 @@
+annna-say
+\ No newline at end of file
diff --git a/annna-say b/annna-say
@@ -4,6 +4,13 @@
# annna-say -c 'irc.bitreich.org/#bitreich-en' Hello World!
#
+if [ "$(basename "$0")" = "annna-cmd" ];
+then
+ outfile="out"
+else
+ outfile="in"
+fi
+
export PATH="$PATH:/home/annna/bin"
usage() {
@@ -56,10 +63,10 @@ do
ircpath="${ircbase}/${cserver}/${cname}"
if [ -e "$ircpath/in" ];
then
- printf "%s\n" "$@" | fold -w 250 -s > "${ircpath}/in"
+ printf "%s\n" "$@" | fold -w 250 -s > "${ircpath}/${outfile}"
else
ircpath="${ircbase}/${cserver}"
- # Might be a user.
+ # Might be a user. Do not bother with outfile, he/she is not i…
printf "%s\n" "$@" \
| fold -w 250 -s \
| while read -r line;
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.