Inform the customer to redial to their BOL account, if oneline failed. - annna … | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 1fde194bb951c56ea79c37f4a87f114dbd06dc48 | |
parent bd2bee0857cd1561ac72a21cca90d38ba1961141 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 2 Jan 2021 16:34:36 +0100 | |
Inform the customer to redial to their BOL account, if oneline failed. | |
Diffstat: | |
M annna-start-services | 7 ++++++- | |
M oneliner | 2 +- | |
2 files changed, 7 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -226,7 +226,12 @@ annna_common() { | |
;; | |
"${botname}, please oneline me.") | |
randomoneliner="$(oneliner)" | |
- annna-say -c "${channel}" "${user}, ${randomoneliner}" | |
+ if [ -z "${randomoneliner}" ]; | |
+ then | |
+ annna-say -c "${channel}" "${user}, the service failed… | |
+ else | |
+ annna-say -c "${channel}" "${user}, ${randomoneliner}" | |
+ fi | |
;; | |
"${botname}, wolfram is "*) | |
word="$(printf "%s\n" "${text}" | cut -c 19- | sed 's,\t, ,… | |
diff --git a/oneliner b/oneliner | |
@@ -14,7 +14,7 @@ do | |
| sed 's,</span></pre></font></div>,,')" | |
if [ -z "${oneliner}" ]; | |
then | |
- return 1 | |
+ exit 1 | |
else | |
if [ $tsvoutput -gt 0 ]; | |
then |