mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 15:15:09 +00:00
use declare -x
This commit is contained in:
parent
f2f5e11610
commit
cb3f3e32f3
@ -29,8 +29,7 @@ export BASHBOT_EVENT_TEXT BASHBOT_EVENT_CMD BASHBOT_EVENT_FILE
|
||||
# any global variable defined by addons MUST be prefixed by addon name
|
||||
ANTIFLOOD_ME="antiflood"
|
||||
|
||||
declare -A ANTIFLOOD_CHATS ANTIFLOOD_ACTUALS
|
||||
export ANTIFLOOD_CHATS ANTIFLOOD_ACTUALS
|
||||
declare -Ax ANTIFLOOD_CHATS ANTIFLOOD_ACTUALS
|
||||
|
||||
ANTIFLOOD_DEFAULT="5" # 5 files per minute
|
||||
ANTIFLOOD_BAN="5" # 5 minutes
|
||||
|
14
bashbot.sh
14
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$$ v0.90-dev2-11-g59aa9fc
|
||||
#### $$VERSION$$ v0.90-dev2-12-gf2f5e11
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
@ -133,9 +133,9 @@ UPD_URL=$URL'/getUpdates?offset='
|
||||
GETFILE_URL=$URL'/getFile'
|
||||
|
||||
unset USER
|
||||
declare -a CMD
|
||||
declare -A UPD BOTSENT USER MESSAGE URLS CONTACT LOCATION CHAT FORWARD REPLYTO VENUE iQUERY
|
||||
export res CMD UPD BOTSENT USER MESSAGE URLS CONTACT LOCATION CHAT FORWARD REPLYTO VENUE iQUERY CAPTION
|
||||
declare -ax CMD
|
||||
declare -Ax UPD BOTSENT USER MESSAGE URLS CONTACT LOCATION CHAT FORWARD REPLYTO VENUE iQUERY
|
||||
export res CAPTION
|
||||
|
||||
|
||||
COMMANDS="${BASHBOT_ETC:-.}/commands.sh"
|
||||
@ -370,10 +370,8 @@ process_client() {
|
||||
grep -q "$tmpcount" <"${COUNTFILE}" &>/dev/null || cat <<< "$tmpcount" >>"${COUNTFILE}"
|
||||
}
|
||||
|
||||
declare -A BASBOT_EVENT_INLINE BASBOT_EVENT_MESSAGE BASHBOT_EVENT_CMD BASBOT_EVENT_REPLY BASBOT_EVENT_FORWARD
|
||||
declare -A BASBOT_EVENT_CONTACT BASBOT_EVENT_LOCATION BASBOT_EVENT_FILE BASHBOT_EVENT_TEXT
|
||||
export BASBOT_EVENT_INLINE BASBOT_EVENT_MESSAGE BASHBOT_EVENT_CMD BASBOT_EVENT_REPLY BASBOT_EVENT_FORWARD
|
||||
export BASBOT_EVENT_CONTACT BASBOT_EVENT_LOCATION BASBOT_EVENT_FILE BASHBOT_EVENT_TEXT
|
||||
declare -Ax BASBOT_EVENT_INLINE BASBOT_EVENT_MESSAGE BASHBOT_EVENT_CMD BASBOT_EVENT_REPLY BASBOT_EVENT_FORWARD
|
||||
declare -Ax BASBOT_EVENT_CONTACT BASBOT_EVENT_LOCATION BASBOT_EVENT_FILE BASHBOT_EVENT_TEXT
|
||||
|
||||
event_inline() {
|
||||
local event debug="$1"
|
||||
|
Loading…
Reference in New Issue
Block a user