From ba40f680c39be0cb31f1dab26155d5b5df6a0efc Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 29 Mar 2023 18:16:32 +0200 Subject: [PATCH] poush --- API/QRCODE.sh | 16 ++++++++++++++-- tools/VOEUX.print.sh | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/API/QRCODE.sh b/API/QRCODE.sh index aaffe58f..4c940d2b 100755 --- a/API/QRCODE.sh +++ b/API/QRCODE.sh @@ -278,6 +278,7 @@ else ## GET VISITOR G1 WALLET AMOUNT : VISITORCOINS echo "COINScheck : ${MY_PATH}/../tools/jaklis/jaklis.py balance -p ${QRCODE}" VISITORCOINS=$(${MY_PATH}/../tools/COINScheck.sh ${QRCODE} | tail -n 1) + COINSFILE=$HOME/.zen/tmp/coucou/${QRCODE}.COINS ## EMPTY WALLET ? PREPARE PALPE WELCOME if [[ $VISITORCOINS == "" || $VISITORCOINS == "null" ]]; then @@ -290,8 +291,19 @@ else echo "VISITEUR POSSEDE ${VISITORCOINS} G1" ## GET G1 WALLET HISTORY - [[ ! -s ~/.zen/tmp/coucou/${QRCODE}.g1history.json ]] \ - && ${MY_PATH}/../tools/timeout.sh -t 20 $MY_PATH/../tools/jaklis/jaklis.py history -p ${QRCODE} -j > ~/.zen/tmp/coucou/${QRCODE}.g1history.json & + if [ ${VISITORCOINS} -gt 0 ]; then + + [[ ! -s ~/.zen/tmp/coucou/${QRCODE}.g1history.json ]] \ + && ${MY_PATH}/../tools/timeout.sh -t 20 $MY_PATH/../tools/jaklis/jaklis.py history -p ${QRCODE} -j > ~/.zen/tmp/coucou/${QRCODE}.g1history.json + echo "${HTTPCORS}" > ~/.zen/tmp/${MOATS}/index.redirect + cat ~/.zen/tmp/coucou/${QRCODE}.g1history.json >> ~/.zen/tmp/${MOATS}/index.redirect + ( + cat ~/.zen/tmp/${MOATS}/index.redirect | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 + echo "BLURP $PORT" && rm -Rf ~/.zen/tmp/${MOATS} + ) & + exit 0 + + fi ## SCAN GCHANGE + [[ ! -s ~/.zen/tmp/coucou/${QRCODE}.gchange.json ]] \ diff --git a/tools/VOEUX.print.sh b/tools/VOEUX.print.sh index 60bda6f1..e5c111c6 100755 --- a/tools/VOEUX.print.sh +++ b/tools/VOEUX.print.sh @@ -34,8 +34,8 @@ echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" for v in $(cat ~/.zen/game/players/$PLAYER/voeux/*/*/.title); do g1pub=$(grep -r $v ~/.zen/game/players/$PLAYER/voeux/ 2>/dev/null | rev | cut -d '/' -f 2 | rev ) -# echo "$v : $g1pub" -# echo '------------------------------------------------------------------' + echo "$v : $g1pub" + echo '------------------------------------------------------------------' vlist=($v:$g1pub ${vlist[@]}) done