remove use of BOTDAMIN to et bot admin

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-12-31 18:20:32 +01:00
parent b04ee84b1d
commit ddb2785f8b
2 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@
# this addon counts how many files, e.g. stickers, are sent to # this addon counts how many files, e.g. stickers, are sent to
# a chat and takes actions if threshold is reached # a chat and takes actions if threshold is reached
# #
#### $$VERSION$$ v1.20-0-g2ab00a2 #### $$VERSION$$ v1.21-dev-44-gb04ee84
# used events: # used events:
# #
@ -44,7 +44,7 @@ fi
# register on startbot # register on startbot
if [[ "$1" = "start"* ]]; then if [[ "$1" = "start"* ]]; then
ANTIFL_ADMIN="$(< "${BOTADMIN}")" ANTIFL_ADMIN="$(getConfigKey "botadmin")"
#load existing chat settings on start #load existing chat settings on start
jssh_readDB "ANTIFL_CHATS" "addons/$ANTIFL_ME" jssh_readDB "ANTIFL_CHATS" "addons/$ANTIFL_ME"

View File

@ -4,7 +4,7 @@
# Addons can register to bashbot events at startup # Addons can register to bashbot events at startup
# by providing their name and a callback per event # by providing their name and a callback per event
# #
#### $$VERSION$$ v1.21-dev-1-g03bdecb #### $$VERSION$$ v1.21-dev-44-gb04ee84
# #
# If an event occurs each registered event function is called. # If an event occurs each registered event function is called.
# #
@ -60,6 +60,7 @@ fi
if [[ "$1" = "start"* ]]; then if [[ "$1" = "start"* ]]; then
# register to reply # register to reply
BASHBOT_EVENT_REPLY["${EXAMPLE_ME}"]="${EXAMPLE_ME}_reply" BASHBOT_EVENT_REPLY["${EXAMPLE_ME}"]="${EXAMPLE_ME}_reply"
EXAMPLE_ADMIN="$(getConfigKey "botadmin")"
# any function defined by addons MUST be prefixed by addon name # any function defined by addons MUST be prefixed by addon name
# function local variables can have any name, but must be LOCAL # function local variables can have any name, but must be LOCAL
@ -87,7 +88,7 @@ if [[ "$1" = "start"* ]]; then
# any function defined by addons MUST be prefixed by addon name # any function defined by addons MUST be prefixed by addon name
# function local variables can have any name, but must be LOCAL # function local variables can have any name, but must be LOCAL
example_after5min(){ example_after5min(){
send_markdown_message "$(< "${BOTADMIN}")" "This is a one time event after 5 Minutes!" & send_markdown_message "${EXAMPLE_ADMIN}" "This is a one time event after 5 Minutes!" &
} }
BASHBOT_EVENT_TIMER["${EXAMPLE_ME}every2min","2"]="${EXAMPLE_ME}_every2min" BASHBOT_EVENT_TIMER["${EXAMPLE_ME}every2min","2"]="${EXAMPLE_ME}_every2min"
@ -95,7 +96,7 @@ if [[ "$1" = "start"* ]]; then
# any function defined by addons MUST be prefixed by addon name # any function defined by addons MUST be prefixed by addon name
# function local variables can have any name, but must be LOCAL # function local variables can have any name, but must be LOCAL
example_every2min(){ example_every2min(){
send_markdown_message "$(< "${BOTADMIN}")" "This a a every 2 minute event ..." & send_markdown_message "${EXAMPLE_ADMIN}" "This a a every 2 minute event ..." &
} }
# register to send # register to send