diff --git a/engine/function/general.php b/engine/function/general.php
index f865a20..51e7f1b 100644
--- a/engine/function/general.php
+++ b/engine/function/general.php
@@ -40,6 +40,23 @@ function data_dump($print = false, $var = false, $title = false) {
echo '
';
}
+function getConfigLua() {
+ $filename = config('server_path') . '/config.lua';
+ if (!file_exists($filename)) {
+ return;
+ }
+ $contents = file_get_contents($filename);
+ $array = explode("\n", $contents);
+ $output = [];
+ foreach ($array as $arr) {
+ if (strpos($arr, '--') !== 0) {
+ $output[] = $arr;
+ }
+ }
+ $ini = implode("\n", $output);
+ return parse_ini_string($ini);
+}
+
function accountAccess($accountId, $TFS) {
$accountId = (int)$accountId;
$access = 0;
diff --git a/serverinfo.php b/serverinfo.php
index 1a97ca9..aee45ec 100644
--- a/serverinfo.php
+++ b/serverinfo.php
@@ -5,23 +5,14 @@ Here you will find all basic information about '.$config['site_ti
Server rates';
if ($stages_path->config['enabled'] != 0) {
// Stages are beeing used
@@ -37,7 +28,7 @@ if (file_exists($config['server_path'].'/config.lua')) {
}
}
echo '';
-
+
} else {
// Not using stages
echo "