From: Harvie Date: Tue, 24 Aug 2010 01:10:54 +0000 (+0200) Subject: Autokiss now shuffles if possible X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=3971900dcde58c50b85eabf0d4bcf5f20ba1114a;p=mirrors%2Flibpurple-core-answerscripts.git Autokiss now shuffles if possible --- diff --git a/purple/answerscripts.d/autokiss.sh b/purple/answerscripts.d/autokiss.sh index 46dc712..572dc92 100755 --- a/purple/answerscripts.d/autokiss.sh +++ b/purple/answerscripts.d/autokiss.sh @@ -1,3 +1,4 @@ #!/bin/sh #AutoKiss :-* (just wanna be polite) -echo $(echo "$ANSW_MSG" | grep -Eo ':-\*|\*IN LOVE\*|:-\{\}|\*KISSING\*'); +shuf="$(which shuf 2>/dev/null)"; [ -x "$shuf" ] || shuf="cat"; #shuffle if possible +echo $(echo "$ANSW_MSG" | grep -Eo ':-\*|\*IN LOVE\*|:-\{\}|\*KISSING\*' | "$shuf" );