Add channel filter list for linkbrother module. - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit c26f93065a09048cf1aed31fdd4352fc19033beb
(DIR) parent da14c8b6d5c5f9dc87141d19c00cdeff5a18b04b
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Tue, 8 Aug 2023 18:17:15 +0200
Add channel filter list for linkbrother module.
Diffstat:
M annna-message-common | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -10,6 +10,7 @@ idontcaredb="${modbase}/i-dont-care/i-dont-care.txt"
printnhashtags=2
brmembers="__20h__ Evil_Bob chripo posativ quinq stateless solene josuah parazyd bin KatolaZ adc"
referees="__20h__"
+linkbrotherchannels="#bitreich-en #bitreich-con"
server="$1"
ircuser="$(cat ${cfgbase}/${server}/ircuser)"
@@ -240,9 +241,17 @@ case "${text}" in
;;
esac
-critique=$($modbase/linkbrother/linkbrother.sh "$modbase/linkbrother/db" "$user" "$text")
-if [ "$critique" ]; then
- annna-say -s "${server}" -c "${channel}" "$critique"
+runlinkbrother=0
+for linkbrotherchannel in $linkbrotherchannels;
+do
+ [ "$channel" = "$linkbrotherchannel" ] && runlinkbrother=1
+done
+if [ $runlinkbrother -eq 1 ];
+then
+ critique=$($modbase/linkbrother/linkbrother.sh "$modbase/linkbrother/db" "$user" "$text")
+ if [ "$critique" ]; then
+ annna-say -s "${server}" -c "${channel}" "$critique"
+ fi
fi
case "${text}" in