Don't "prediuct" levelups in the past

This commit is contained in:
Vincent Riquer 2015-02-21 00:08:42 +01:00
parent c99f70da58
commit 469c4a660a

View File

@ -18,6 +18,7 @@
get_next_level() {
local level
local now=$(date +%s)
next=()
for (( level = curlevel + 1; level <= 16; level++))
do
@ -34,6 +35,7 @@ get_next_level() {
read
while read level timestamp
do
(( timestamp && timestamp < now )) && timestamp=$now
nextlevels[level]=$timestamp
done
} < <(
@ -93,6 +95,7 @@ get_next_level() {
read
while read matter timestamp
do
(( timestamp && timestamp < now )) && timestamp=$now
case $matter in
bronze)
nextbronze[timestamp]+="$stat "