Remove code to check for the latest version

This commit is contained in:
Jamie Cameron
2021-08-22 21:16:55 -07:00
parent ee9ff4accb
commit 0ef5902dd7
4 changed files with 1 additions and 38 deletions
-1
View File
@@ -6,4 +6,3 @@ unix_user=Führe Minecraft Server als Benutzer aus,5
init_name=Name des initialen Skripts,0
history_size=Befehlshistorie Größe,0
port=Minecraft-Server-Port-Nummer,3,Standard (25565)
download_version=Version von Minecraft zum herunterladen,3,Letzte
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/local/bin/perl
# Download the latest JAR file
# Download the latest JAR file during initial setup
use strict;
use warnings;
-21
View File
@@ -44,21 +44,6 @@ elsif ($err) {
return;
}
# Check if new version is out, if we haven't checked in the last 6 hours
&update_last_check();
if ($config{'last_size'} && &minecraft_server_type() eq 'default') {
my $jar = &get_minecraft_jar();
my @st = stat($jar);
if (@st && $st[7] != $config{'last_size'}) {
print "<table width=100%><tr bgcolor=#ff8888>".
"<td align=center><br>";
print &ui_form_start("download.cgi");
print "<b>$text{'index_upgradedesc'}</b>\n";
print &ui_form_end([ [ undef, $text{'index_upgrade'} ] ]);
print "</td></tr></table>\n";
}
}
my @links = ( "edit_conf.cgi", "edit_users.cgi",
"view_logs.cgi", "list_conns.cgi",
"list_worlds.cgi", "edit_cmds.cgi",
@@ -95,12 +80,6 @@ else {
$text{'index_startdesc'});
}
if (&minecraft_server_type() eq 'default') {
# Show download button
print &ui_buttons_row("download.cgi", $text{'index_download'},
$text{'index_downloaddesc'});
}
# Show start at boot button
&foreign_require("init");
my $starting = &init::action_status($config{'init_name'});
-15
View File
@@ -943,21 +943,6 @@ for(my $i=0; $i<@xpmap; $i+=2) {
return undef;
}
# update_last_check()
# 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 ||
$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();
}
}
# get_current_day_usage()
# Returns a hash ref from usernames to total usage over the last day, and
# usage that counts towards any limits