<commit_before>#!/bin/bash

IFS=":"
AUTH_OK=1
AUTH_FAILED=0
LOGFILE="/var/log/prosody/auth.log"
USELOG=true

while read ACTION USER HOST PASS ; do

    [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST Pass: $PASS" >> $LOGFILE; }

    case $ACTION in
	"auth")
	    if [ $USER == "someone" ] ; then
        	echo $AUTH_OK
            else
		echo $AUTH_FAILED
	    fi
	;;
	*)
	    echo $AUTH_FAILED
	;;
    esac

done
<commit_msg>mod_auth_external/examples: bash: Don't use log file by default<commit_after>#!/bin/bash

IFS=":"
AUTH_OK=1
AUTH_FAILED=0
LOGFILE="/var/log/prosody/auth.log"
USELOG=false

while read ACTION USER HOST PASS ; do

    [ $USELOG == true ] && { echo "Date: $(date) Action: $ACTION User: $USER Host: $HOST Pass: $PASS" >> $LOGFILE; }

    case $ACTION in
	"auth")
	    if [ $USER == "someone" ] ; then
        	echo $AUTH_OK
            else
		echo $AUTH_FAILED
	    fi
	;;
	*)
	    echo $AUTH_FAILED
	;;
    esac

done

{'fraction_non_alphanumeric': 0.14943705220061412, 'fraction_numerical': 0.0040941658137154556, 'mean_word_length': 2.7471264367816093, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1083304', 'n_tokens_mistral': 388, 'n_tokens_neox': 376, 'n_words': 97}