diff --git a/admin/bot.php b/admin/bot.php deleted file mode 100644 index 69f21cf..0000000 --- a/admin/bot.php +++ /dev/null @@ -1,78 +0,0 @@ - - - - LegacyWorlds Beta 5 > Administration > IRC bot - - -

LWB5 > Administration > IRC bot

-

Operation in progress...

-

- A system operation is in progress. Please wait, the page will update in a few seconds. -

- - - - - - - LegacyWorlds Beta 5 > Administration > IRC bot - - -

LWB5 > Administration > IRC bot

- -

- IRC bot is (probably) running. Kill bot -

- -

- IRC bot is not running. Start bot -

- - - diff --git a/admin/index.html b/admin/index.html index c5b7c43..59ed48d 100644 --- a/admin/index.html +++ b/admin/index.html @@ -16,10 +16,8 @@

Server management

diff --git a/admin/proxy.php b/admin/proxy.php deleted file mode 100644 index e2ad00b..0000000 --- a/admin/proxy.php +++ /dev/null @@ -1,126 +0,0 @@ - - - - LegacyWorlds Beta 5 > Administration > Proxy detector - - -

LWB5 > Administration > Proxy detector

-

Operation in progress...

-

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

- - - - 254) { - $status = "Invalid IP address"; - break; - } - } - if ($status == "") { - try { - $result = pcheck::check(array($ip)); - $status = "$ip - "; - switch ($result[$ip]) { - case -1: $status .= "detection failed"; break; - case 0: $status .= "no proxy detected"; break; - case 1: $status .= "OPEN PROXY DETECTED!"; break; - } - } catch (Exception $e) { - $status = $e->getMessage(); - } - } - } - } else { - $status = "Invalid IP address"; - } -} else { - $status = $ip = ""; -} - -?> - - - LegacyWorlds Beta 5 > Administration > Proxy detector - - -

LWB5 > Administration > Proxy detector

- -

- Proxy detector is running; process ID #. Stop detector -

-
-

- Manually check address - - ' . $status . '') : ''?> -

-
- -

- Proxy detector is not running. Start detector -

- - - diff --git a/scripts/lib/config.inc b/scripts/lib/config.inc index 785c7cd..f354007 100644 --- a/scripts/lib/config.inc +++ b/scripts/lib/config.inc @@ -38,6 +38,12 @@ class config { private static function writeCache($cObj) { $config = &config::$main; + umask(0007); + if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'], 0770)) { + l::warn("CONFIG: failed to create cache directory"); + return; + } + $text = serialize($cObj); $mask = umask(0002); $w = @file_put_contents("{$config['cachedir']}/config.ser", $text, LOCK_EX); diff --git a/scripts/lib/resource.inc b/scripts/lib/resource.inc index ac9cb39..e38afc2 100644 --- a/scripts/lib/resource.inc +++ b/scripts/lib/resource.inc @@ -56,7 +56,8 @@ function addRawResource($type, $text) { /** This function generates the cached output for a set of resources. */ function generateResourceCache($type, $md5) { - if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'])) { + umask(0007); + if (!is_dir(config::$main['cachedir']) && !@mkdir(config::$main['cachedir'], 0770)) { l::warn("Could not create cache dir " . config::$main['cachedir']); return false; }