add option to set other users as recipients for filtered memes - 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 f3872b34fadbe1e6096a486bd1fb6051778470b4
DIR parent e3bfabf5954ba743f1f18c92bba7531e8db6376b
HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 29 Jul 2021 12:04:09 +0200
add option to set other users as recipients for filtered memes
example:
< adc> annna, please sexify #good for __20h__
< annna> __20h__, gopher://bitreich.org/9/memecache/filter/sexify-good.mkv
Signed-off-by: Annna Robert-Houdin <annna@bitreich.org>
Diffstat:
M annna-message-common | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -723,7 +723,8 @@ case "${text}" in
"${botname}, please scrollify #"*|\
"${botname}, please sendtohell #"*|\
"${botname}, please amsterdamify #"*)
- hashtag="$(printf "%s\n" "${text}" | sed 's/.*#//' )"
+ hashtag="$(printf "%s\n" "${text}" | sed 's/.*#//; s/ .*//' )"
+ recipient="$(printf "%s\n" "${text}" | sed 's/.* for //' )"
origext="$(grep -E "^#${hashtag} " "${hashtagfile}" | sed 's/.*\.//')"
{
filter="$(printf '%s\n' "${text}" | cut -d' ' -f3)"
@@ -737,6 +738,11 @@ case "${text}" in
ffmpeg-effect "${filter}" "${inpath}" "${outpath}"
+ if [ "${recipient}" != "${text}" ];
+ then
+ user="${recipient}"
+ fi
+
if [ -s "${outpath}" ];
then
annna-say -c "${channel}" "${user}, gopher://bitreich.org/9/memecache/filter/${outfile}"