diff --git a/minecraft/minecraft-lib.pl b/minecraft/minecraft-lib.pl index 12744cedc..0d2f26fa7 100644 --- a/minecraft/minecraft-lib.pl +++ b/minecraft/minecraft-lib.pl @@ -931,13 +931,16 @@ return undef; } # update_last_check() -# If the last check time is too old, check for the latest version +# If the last check time is too old OR the version has changed, check for the +# latest version sub update_last_check { -if (time() - $config{'last_check'} > 6*60*60) { +if (time() - $config{'last_check'} > 6*60*60 || + $config{'download_version'} ne $config{'last_version'}) { my $sz = &check_server_download_size(); $config{'last_check'} = time(); $config{'last_size'} = $sz; + $config{'last_version'} = $config{'download_version'}; &save_module_config(); } }