Commit bc331108 authored by user472393's avatar user472393
Browse files

fix elo_export to work with melee style repicks

parent ee75868f
tetro48
debug
20
11
.----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------. .----------------.
......
......@@ -367,7 +367,6 @@ elo_export () {
for j in "${!comments[@]}"; do
printf '%s\t\n' "${results[$j]}" "${comments[$j]}" " "
done
printf '%s\n\n' "${modes[@]}"
printf '%s\n' "$p1 ${elo_db[$p1]}" "$p2 ${elo_db[$p2]}"
printf '%s\n\n' "#######"
} >> "$db_dir/$i.tmp"
......@@ -584,18 +583,20 @@ result_check () {
if tail -n 1 "$channel" | grep -i "$p1" | grep '!won'; then
elo_case1
results+=("${modes[entry]} (+$p1)")
comments[entry]=$(tail -n 1 "$channel")
comments[entry]=${comments[entry],,}
comments[entry]=${comments[entry]#*!won}
comment_string=$(tail -n 1 "$channel")
comment_string=${comment_string,,}
comment_string=${comment_string#*!won}
comments+=("$comment_string")
loser="$p2"
sleep 1
return 1
elif tail -n 1 "$channel" | grep -i "$p1" | grep '!lost'; then
elo_case2
results+=("${modes[entry]} (+$p2)")
comments[entry]=$(tail -n 1 "$channel")
comments[entry]=${comments[entry],,}
comments[entry]=${comments[entry]#*!lost}
comment_string=$(tail -n 1 "$channel")
comment_string=${comment_string,,}
comment_string=${comment_string#*!lost}
comments+=("$comment_string")
loser="$p1"
sleep 1
return 1
......@@ -606,18 +607,20 @@ result_check () {
if [[ "$result" =~ $p1 && "$result" =~ !won ]]; then
elo_case1
results+=("${modes[entry]} (+$p1)")
comments[entry]=$result
comments[entry]=${comments[entry],,}
comments[entry]=${comments[entry]#*!won}
comment_string=$(tail -n 1 "$channel")
comment_string=${comment_string,,}
comment_string=${comment_string#*!won}
comments+=("$comment_string")
loser="$p2"
sleep 1
return 1
elif [[ "$result" =~ $p1 && "$result" =~ !lost ]]; then
elo_case2
results+=("${modes[entry]} (+$p2)")
comments[entry]=$result
comments[entry]=${comments[entry],,}
comments[entry]=${comments[entry]#*!lost}
comment_string=$(tail -n 1 "$channel")
comment_string=${comment_string,,}
comment_string=${comment_string#*!lost}
comments+=("$comment_string")
loser="$p1"
sleep 1
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment