From: Harvie Date: Tue, 17 Jan 2012 05:21:42 +0000 (+0100) Subject: Bit more sanitizing strings passed to MegaHAL X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=commitdiff_plain;h=1c4a0e174495019ba2919beedf1baad1a3876889 Bit more sanitizing strings passed to MegaHAL --- diff --git a/purple/answerscripts.d/00-megahal.sh b/purple/answerscripts.d/00-megahal.sh index ab636c1..70cbe32 100755 --- a/purple/answerscripts.d/00-megahal.sh +++ b/purple/answerscripts.d/00-megahal.sh @@ -6,5 +6,5 @@ AI_LOUD=false #enable loud replies (otherwise will be learning only :-) AI_LOUD_UNAVAILABLE=true; #enable loud replies when not available :-) $AI_LOUD_UNAVAILABLE && [ "$ANSW_L_STATUS" != 'available' ] && AI_LOUD=true -AI_ANSW="$({ echo "$ANSW_MSG." && echo -e '\n#quit\n'; } | timeout 23 megahal -p -b -w | tail -n1)" +AI_ANSW="$({ echo "$ANSW_MSG." | sed -e 's/#//g' && echo -e '\n#quit\n'; } | timeout 23 megahal -p -b -w | tail -n1)" $AI_LOUD && [ -n "$AI_ANSW" ] && echo -n "[MegaHALuz]: $AI_ANSW"