Add a nice idea of parazyd with menu type support. - 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 e488390589d91d7b15bb26922ed041b958d4eaa5 DIR parent a69cbe4d58fb20e13e1c11d868562622f35b203a HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Tue, 3 Apr 2018 19:10:46 +0200 Add a nice idea of parazyd with menu type support. Diffstat: M annna-start-services | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-start-services b/annna-start-services @@ -188,6 +188,26 @@ then continue; fi + if [ "${text}" = "${botname}, I'm bored." ]; + then + randomlink="$(/br/bin/bitreich-lawn-random-link)" + linktype="$(printf "%s\n" "${randomlink}" | cut -d '|' -f1 | cut -c2-)" + linktext="$(printf "%s\n" "${randomlink}" | cut -d '|' -f2)" + linksel="$(printf "%s\n" "${randomlink}" | cut -d '|' -f3)" + linkserver="$(printf "%s\n" "${randomlink}" | cut -d '|' -f4)" + linkport="$(printf "%s\n" "${randomlink}" | cut -d '|' -f5 | cut -c-2)" + outtext="$(printf "%s - gopher://%s" "$linktext" "$linkserver")" + if [ "$linkport" != "70" -a "$linkport" != "port" ]; + then + outtext="$(printf "%s:%s" "$outtext" "$linkport")" + fi + if [ -n "$linksel" ]; + then + outtext="$(printf "%s/%s%s" "$outtext" "$linktype" "$linksel")" + fi + annna-say -c "#bitreich-en" "$outtext" + fi + if [ "${text}" = "${botname}, please help" ]; then # TODO: Add multiple line support to annna-say -c(1) with sleep.