From 43863b1d6390d8eced602f1762a6c563e98bc17d Mon Sep 17 00:00:00 2001 From: Harvie Date: Tue, 17 Jan 2012 09:00:49 +0100 Subject: [PATCH] Fixed stupid bug --- purple/answerscripts.d/00-megahal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purple/answerscripts.d/00-megahal.sh b/purple/answerscripts.d/00-megahal.sh index 800210d..825fbba 100755 --- a/purple/answerscripts.d/00-megahal.sh +++ b/purple/answerscripts.d/00-megahal.sh @@ -6,10 +6,10 @@ AI_LOUD=false #enable loud replies (otherwise will be learning only :-) AI_LOUD_UNAVAILABLE=true; #enable loud replies when not available :-) AI_REMEMBER=true; #set false if you don't want MegaHAL to learn new phrases (this can prevent data corruption) +$AI_LOUD_UNAVAILABLE && [ "$ANSW_L_STATUS" != 'available' ] && AI_LOUD=true $AI_LOUD || $AI_REMEMBER || exit 23; #No speaking + No learning = Exitus AI_CMD_QUIT='#EXIT' $AI_REMEMBER && AI_CMD_QUIT='#QUIT' -$AI_LOUD_UNAVAILABLE && [ "$ANSW_L_STATUS" != 'available' ] && AI_LOUD=true AI_ANSW="$({ echo "$ANSW_MSG." | sed -e 's/#//g' && echo -e "\n$AI_CMD_QUIT\n"; } | timeout 23 megahal -p -b -w | tail -n1)" $AI_LOUD && [ -n "$AI_ANSW" ] && echo -n "[MegaHALuz]: $AI_ANSW" -- 2.30.2