Move distro-hopping to non-member part. - 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 3fe1bab37b1ff455f0e8f4a867f1c1d47ee82e48
(DIR) parent d61690b5e0303658299d0c0344ee5eaac4e97f66
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sun, 19 Apr 2020 23:13:53 +0200
Move distro-hopping to non-member part.
Diffstat:
M annna-start-services | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/annna-start-services b/annna-start-services
@@ -405,6 +405,16 @@ then
continue;
fi
+ if [ "${text}" = "${botname}, please distro-hop with me." ];
+ then
+ ndistro="$(curl -s 'https://distrowatch.com/dwres.php?resource=popularity' \
+ | grep phr2 \
+ | sed 's,.*href="\(.*\)".*,\1,' \
+ | sort | uniq | shuf -n 1)"
+ annna-say -c "#bitreich-en" "How about https://distrowatch.com/${ndistro} ?"
+ continue;
+ fi
+
ismember=0
for member in $brmembers;
do
@@ -519,16 +529,6 @@ then
continue;
fi
- if [ "${text}" = "${botname}, please distro-hop with me." ];
- then
- ndistro="$(curl -s 'https://distrowatch.com/dwres.php?resource=popularity' \
- | grep phr2 \
- | sed 's,.*href="\(.*\)".*,\1,' \
- | sort | uniq | shuf -n 1)"
- annna-say -c "#bitreich-en" "How about https://distrowatch.com/${ndistro} ?"
- continue;
- fi
-
if [ "${text}" = "${botname}, please dance with me." ];
then
if [ $(($RANDOM % 2)) -gt 0 ];