mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-27 12:42:40 +00:00
fix stupid mynewlinestartshere mistake
This commit is contained in:
parent
3719c81f9d
commit
0d38a67cf5
11
README.md
11
README.md
@ -75,8 +75,17 @@ To set access rights for your bashbot installation to a reasonable default run `
|
||||
### Is this Bot insecure?
|
||||
Bashbot is not more (in)secure as any other Bot written in any other language, we have done our best to make it as secure as possible. But YOU are responsible for the bot commands you wrote and you should know about the risks ...
|
||||
|
||||
### Why Bash and not the much better ...?
|
||||
Well, thats a damn good question ... may be because I'm an Unix/Linux admin from stone age. Nevertheless there are more reasons from my side:
|
||||
|
||||
- bashbot will run everywhere where bash is availible, from ebedded linux to mainframe
|
||||
- easy to integrate with other shell/bashscripts for system admins to send status updates
|
||||
- no need to install or learn a new programming language, library or framwework
|
||||
- no database, not event driven, not OO ...
|
||||
-
|
||||
|
||||
## That's it!
|
||||
|
||||
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
|
||||
|
||||
#### $$VERSION$$ v0.70-pre1-2-g293ad08
|
||||
#### $$VERSION$$ v0.70-pre1-3-g3719c81
|
||||
|
17
README.txt
17
README.txt
@ -121,11 +121,26 @@ language, we have done our best to make it as secure as possible. But
|
||||
YOU are responsible for the bot commands you wrote and you should know
|
||||
about the risks ...
|
||||
|
||||
Why Bash and not the much better ...?
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Well, thats a damn good question ... may be because I'm an Unix/Linux
|
||||
admin from stone age. Nevertheless there are more reasons from my side:
|
||||
|
||||
* bashbot will run everywhere where bash is availible, from ebedded
|
||||
linux to mainframe
|
||||
* easy to integrate with other shell/bashscripts for system admins to
|
||||
send status updates
|
||||
* no need to install or learn a new programming language, library or
|
||||
framwework
|
||||
* no database, not event driven, not OO ...
|
||||
*
|
||||
|
||||
That's it!
|
||||
~~~~~~~~~~
|
||||
|
||||
If you feel that there's something missing or if you found a bug, feel
|
||||
free to submit a pull request!
|
||||
|
||||
latexmath:[\[VERSION\]] v0.70-pre1-2-g293ad08
|
||||
latexmath:[\[VERSION\]] v0.70-pre1-3-g3719c81
|
||||
+++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# description: Start or stop telegram-bash-bot
|
||||
#
|
||||
#### $$VERSION$$ v0.70-pre1-0-g490c472
|
||||
#### $$VERSION$$ v0.70-pre1-3-g3719c81
|
||||
# shellcheck disable=SC2009
|
||||
# shellcheck disable=SC2181
|
||||
|
||||
@ -69,12 +69,16 @@ case "$1" in
|
||||
$0 stop; $0 start
|
||||
RETVAL=$?
|
||||
;;
|
||||
'restartback')
|
||||
$0 suspendback; $0 resumeback
|
||||
RETVAL=$?
|
||||
;;
|
||||
'suspendback'|'resumeback'|'killback')
|
||||
$runcmd "$start $1"
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 { start | stop | restart | reload | suspendback | resumeback | killback }"
|
||||
echo "Usage: $0 { start | stop | restart | reload | restartback | suspendback | resumeback | killback }"
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
|
@ -5,7 +5,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.70-pre1-0-g490c472
|
||||
#### $$VERSION$$ v0.70-pre1-3-g3719c81
|
||||
|
||||
# source from commands.sh if you want ro use interactive or background jobs
|
||||
|
||||
@ -18,7 +18,7 @@ send_message() {
|
||||
local text arg keyboard btext burl no_keyboard file lat long title address sent
|
||||
[ "$2" = "" ] && return
|
||||
local mychat="$1"
|
||||
text="$(sed <<< "${2}" 's/ mynewlinestartshere /\r\n/g; s/ my[kfltab][a-z]\{2,13\}startshere.*//g;s/ mykeyboardendshere.*//g')"
|
||||
text="$(sed <<< "${2}" 's/ mynewlinestartshere/\r\n/g; s/ my[kfltab][a-z]\{2,13\}startshere.*//g;s/ mykeyboardendshere.*//g')"
|
||||
arg="$3"
|
||||
[ "$arg" != "safe" ] && {
|
||||
no_keyboard="$(sed <<< "${2}" '/mykeyboardendshere/!d;s/.*mykeyboardendshere.*/mykeyboardendshere/')"
|
||||
|
Loading…
Reference in New Issue
Block a user