Bashbot Version 0.70 - startproc

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-05-01 19:21:57 +02:00
parent e337b745bb
commit 8ea9e3b158
4 changed files with 5 additions and 5 deletions

View File

@ -128,7 +128,7 @@ else
;;
'/cancel'*)
checkprog
checkproc
if [ "$res" -eq 0 ] ; then killproc && _message "Command canceled.";else _message "No command is currently running.";fi
;;
*) # forward other messages to optional dispatcher

View File

@ -1,6 +1,6 @@
#!/bin/bash
# file: calc.sh
# example for an interactive chat, run with startprog calc.sh
# example for an interactive chat, run with startproc calc.sh
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)

View File

@ -1,6 +1,6 @@
#!/bin/bash
# file: question.sh
# example for an interactive chat, run with startprog question.sh
# example for an interactive chat, run with startproc question.sh
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)

View File

@ -32,7 +32,7 @@ mycommands() {
fi
;;
'/run-notify'*) # start notify background job
'/run_notify'*) # start notify background job
myback="notify"; checkback "$myback"
if [ "$res" -gt 0 ] ; then
background "example/notify 60" "$myback" # notify every 60 seconds
@ -40,7 +40,7 @@ mycommands() {
send_normal_message "${CHAT[ID]}" "Background command $myback already running ..."
fi
;;
'/stop-notify'*) # kill notify background job
'/stop_notify'*) # kill notify background job
myback="notify"; checkback "$myback"
if [ "$res" -eq 0 ] ; then
killback "$myback"