mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
A max tick time of -1 means unlimited
This commit is contained in:
@@ -110,7 +110,7 @@ print &ui_table_row($text{'conf_build'},
|
||||
|
||||
# Max time between ticks
|
||||
my $ticks = &find_value("max-tick-time", $conf);
|
||||
$ticks /= 1000.0 if ($ticks);
|
||||
$ticks /= 1000.0 if ($ticks > 0);
|
||||
print &ui_table_row($text{'conf_ticks'},
|
||||
&ui_opt_textbox("ticks", $ticks, 5, $text{'default'}." (60s)").
|
||||
" ".$text{'conf_ticksecs'}, 3);
|
||||
|
||||
@@ -55,9 +55,11 @@ $in{'players'} =~ /^[1-9]\d*$/ || &error($text{'conf_eplayers'});
|
||||
&save_directive("max-players", $in{'players'}, $conf);
|
||||
|
||||
# Max time between ticks
|
||||
$in{'ticks_def'} || $in{'ticks'} =~ /^\d+(\.\d+)?$/ ||
|
||||
$in{'ticks_def'} || $in{'ticks'} =~ /^\d+(\.\d+)?$/ || $in{'ticks'} == -1 ||
|
||||
&error($text{'conf_eticks'});
|
||||
&save_directive("max-tick-time", $in{'ticks_def'} ? undef : int($in{'ticks'}*1000), $conf);
|
||||
&save_directive("max-tick-time", $in{'ticks_def'} ? undef :
|
||||
$in{'ticks'} == -1 ? -1 :
|
||||
int($in{'ticks'}*1000), $conf);
|
||||
|
||||
# Message of the day
|
||||
$in{'motd_def'} || $in{'motd'} =~ /\S/ || &error($text{'conf_emotd'});
|
||||
|
||||
Reference in New Issue
Block a user