Browse Source

New G1Billets compatible (break 1st 2018 Christmas version)

qo-op 7 months ago
parent
commit
bafc401bdc
2 changed files with 4 additions and 4 deletions
  1. 2 2
      shell/sms_BILLETCHK.sh
  2. 2 2
      sms_received.sh

+ 2 - 2
shell/sms_BILLETCHK.sh

@@ -7,8 +7,8 @@ source ./shell/functions.sh
 log "X sms_BILLETCHK.sh $0"
 
 PHONE="$1"
-CODE="$2 $3 $4 $5"
-SEC="$6 $7 $8"
+CODE="$2 $3"
+SEC="$4 $5 $6 $7"
 
 # Construct billet path
 bpath=$(echo "$CODE" | sed 's/ /_/g')

+ 2 - 2
sms_received.sh

@@ -157,10 +157,10 @@ case "$CMD" in
 		W5=$(echo "$TEXT" | awk '{print tolower($6)}' | grep -E "^[a-z0-9]+$")
 		W6=$(echo "$TEXT" | awk '{print tolower($7)}' | grep -E "^[a-z0-9]+$")
 		W7=$(echo "$TEXT" | awk '{print tolower($8)}' | grep -E "^[a-z0-9]+$")
-		if [[ "$W1" != "" && "$W2" != "" && "$W3" != "" && "$W4" != "" ]]; then
+		if [[ "$W1" != "" && "$W2" != "" ]]; then
 			./shell/sms_BILLETCHK.sh "$PHONE" "$W1" "$W2" "$W3" "$W4" "$W5" "$W6" "$W7" &
 		else
-			./shell/sms_ERROR.sh "$PHONE" "Mauvais Format. Le code doit comporter 4 mots pour vérifier la valeur du billet, 7 mots pour l'encaisser..." &
+			./shell/sms_ERROR.sh "$PHONE" "Mauvais Format. Le code doit comporter 2 mots minimum pour vérifier la valeur du billet, + code secret pour l'encaisser..." &
 		fi
 		;;
 	TAG)