LWB5 > Administration > Game status

Operation in progress...

A system operation is in progress. Please wait, the page will update in 5 seconds.

array('yellow', 'red'), "READY" => array('red', 'yellow'), "RUNNING" => array('white', 'green'), "VICTORY" => array('yellow', 'blue'), "ENDING" => array('black', 'yellow'), "FINISHED" => array("white", "black") ); print "$status"; } function sendFifo($command) { global $aConfig; $fName = $aConfig['ctrlFifo']; if (!file_exists($fName)) { return false; } $fifo = fopen($fName, "w"); fwrite($fifo, "$command\n"); fclose($fifo); redirect(); } function handleCommand($command, $game) { if ($command == 'mv' && $game->status() == 'PRE') { __logAdmin("is making game {$game->name} visible"); sendFifo("READY {$game->name}"); } elseif ($command == 'te' && $game->status() == 'READY' && $game->firstTick() - time() > 24 * 60 * 60 + 30) { __logAdmin("made game {$game->name} start 24h earlier"); sendFifo("START {$game->name} EARLY"); } elseif ($command == 'tl' && $game->status() == 'READY') { __logAdmin("made game {$game->name} start 24h later"); sendFifo("START {$game->name} LATE"); } elseif ($command == 'en' && ($game->status() == 'RUNNING' || $game->status() == "VICTORY")) { __logAdmin("terminated game {$game->name}"); sendFifo("SETEND {$game->name} 0"); } elseif ($command == 'e24' && $game->status() == 'RUNNING') { __logAdmin("set game {$game->name} to end in 24h"); sendFifo("SETEND {$game->name} 24"); } elseif ($command == 'kr' && $game->status() == 'ENDING') { __logAdmin("prevented game {$game->name} from ending"); sendFifo("NOEND {$game->name}"); } elseif ($command == 'ee' && $game->status() == 'ENDING' && $game->lastTick() - time() > 24 * 60 * 60 + 30) { __logAdmin("made game {$game->name} end 24h earlier"); sendFifo("END {$game->name} EARLY"); } elseif ($command == 'el' && $game->status() == 'ENDING') { __logAdmin("made game {$game->name} end 24h later"); sendFifo("END {$game->name} LATE"); } elseif ($command == 'en' && $game->status() == 'ENDING') { __logAdmin("terminated game {$game->name}"); sendFifo("END {$game->name} NOW"); } } // Load the list of games $oldDir = getcwd(); chdir("../scripts"); $__logPrefix = "lwControl"; $__loader = array( 'log', 'classloader', 'version', 'game', 'tick', 'config', 'db_connection', 'db_accessor', 'db', 'library' ); require_once("loader.inc"); chdir($oldDir); $games = config::getGames(); dbConnect(); // Handle commands if ($_GET['c'] != '') { $cGame = $_GET['g']; if (array_key_exists($cGame, $games) && $cGame != 'main') { handleCommand($_GET['c'], $games[$cGame]); } } ?> LegacyWorlds Beta 5 > Administration > Game status

LWB5 > Administration > Game status

Game list

WARNING: make sure you know what you're doing here - there are no second chances on this page; if you click something, that "something" will happen at once.

$game) { if ($name == 'main') { continue; } $status = $game->status(); $firstTick = $game->firstTick(); $lastTick = $game->lastTick(); print " \n \n"; printStatus($status); print " \n"; print " \n \n \n"; } ?>
ID Status Name Ticks Commands
$name" . htmlentities($game->text) . ""; if ($firstTick > time()) { print "Starting at " . gmstrftime('%H:%M:%S on %Y-%m-%d', $firstTick); } elseif ($lastTick == 0) { print "Running since " . gmstrftime('%H:%M:%S on %Y-%m-%d', $firstTick); } elseif ($lastTick > time()) { print "Running until " . gmstrftime('%H:%M:%S on %Y-%m-%d', $lastTick); } else { print "Stopped since " . gmstrftime('%H:%M:%S on %Y-%m-%d', $lastTick); } if ($status == 'PRE') { $cmd = array( array('mv', 'Make visible') ); } elseif ($status == 'READY') { $cmd = array( array('tl', 'Start 24h later') ); if ($firstTick - time() > 24 * 60 * 60 + 30) { array_push($cmd, array('te', 'Start 24h earlier')); } } elseif ($status == 'RUNNING') { $cmd = array( array('e24', 'End in 24h'), array('en', 'End now') ); } elseif ($status == 'VICTORY') { $cmd = array( array('en', 'End game') ); } elseif ($status == 'ENDING') { $cmd = array( array('el', 'Postpone by 24h') ); if ($lastTick - time() > 24 * 60 * 60 + 30) { array_push($cmd, array('ee', 'End 24h earlier')); } array_push($cmd, array('en', 'End now')); array_push($cmd, array('kr', 'Keep running')); } else { $cmd = array(); } print ""; if (count($cmd)) { $lk = array(); foreach ($cmd as $c) { array_push($lk, "" . $c[1] . ""); } print join(' - ', $lk); } else { print " "; } print "

About game status

Games can have the following status:

The game is configured, but is hidden for now
The game is visible, but ticks have not started
The game is running normally
The game is still running but someone reached victory
The game is still available but is about to end.
The game is no longer running and only visible through the rankings page