diff --git a/addons/antiFlood.jssh b/addons/antiFlood.jssh new file mode 100644 index 0000000..e69de29 diff --git a/bashbot.rc b/bashbot.rc index c27fb1b..10cd4e6 100755 --- a/bashbot.rc +++ b/bashbot.rc @@ -5,7 +5,7 @@ # # tested on: ubuntu, opensuse, debian # -#### $$VERSION$$ v1.2-1-gd30a700 +#### $$VERSION$$ v1.2-3-gb0281f1 # shellcheck disable=SC2009 # shellcheck disable=SC2181 @@ -27,7 +27,7 @@ runcmd="echo Dry run:" # not activated until you edit lines below # Configuration Section # edit the next line to fit the user you want to run bashbot, e.g. nobody: -runas="nobody" +runas="root" # uncomment one of the example lines to fit your system # runcmd="su $runas -s /bin/bash -c " # runasuser with *su* diff --git a/bashbot.sh b/bashbot.sh index d17b5b9..7b7858c 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v1.2-1-gd30a700 +#### $$VERSION$$ v1.2-3-gb0281f1 # # Exit Codes: # - 0 success (hopefully) @@ -1093,6 +1093,15 @@ bot_init() { find . -name '*.jssh*' -exec chmod u+w \{\} + echo "Done." fi + # ask to check bottoken online + if [ -z "$(getConfigKey "botid")" ]; then + echo -e "Seems to be your first init. Should I verify your bot token online? (y/N) N\b\c" + read -r ANSWER + if [[ "${ANSWER}" =~ ^[Yy] ]]; then + echo -e "${GREEN}Contacting telegram to verify your bot token ...${NC}" + $0 botname + fi + fi # check if botconf if seems valid echo -e "${GREEN}This is your bot config:${NC}" sed 's/^/\t/' "${BOTCONFIG}.jssh" | grep -vF '["bot_config_key"]'