lwb5-in-2025/game/scripts/config.inc

52 lines
1.2 KiB
PHP

<?php
// This file contains the main configuration for a LegacyWorlds game
// engine instance
$config = array(
// Path and URL to static contents
"staticdir" => __DIR__ . "/../site/static",
"staticurl" => getenv("LW_STATIC_URL") ?: "http://localhost/static",
// Path to game scripts
"scriptdir" => __DIR__,
// Path to the cache
"cachedir" => "/tmp/lwcache",
// Debugging level
"debug" => 2,
// Maintenance mode
"maintenance" => null,
/*
"maintenance" => array(
// Hour/Minutes/Seconds/Month/Day/Year
"until" => mktime(10, 20, 0, 1, 11, 2007),
"reason" => "Upgrading the MySQL server."
),
*/
// Version numbers to make us feel good
"v_engine" => "0.85a",
"v_game" => "Beta 5",
"v_rev" => "2284",
// Control script fifo and directory
"cs_fifo" => "/tmp/.lwFifo",
"cs_path" => "/tmp/.lwControl",
// Trace users?
"trace" => array(),
// Do we need to actually send emails?
"sendmails" => (getenv("LW_SEND_MAIL") ?: "no") == "yes",
);
if (file_exists($config['cachedir'] . "/maintenance.ser")) {
$__maintenanceFile = fopen($config['cachedir'] . "/maintenance.ser", "r");
$config['maintenance'] = unserialize(fgets($__maintenanceFile));
fclose($__maintenanceFile);
}
?>