X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/ce3de10120fe10fb22ec79242fc3dc106eaa9a9d..440ff671f07bf112f2371cbe7e1afb23f2f614b6:/servers/index.php diff --git a/servers/index.php b/servers/index.php index de2a26f..0095e1c 100644 --- a/servers/index.php +++ b/servers/index.php @@ -2,24 +2,94 @@ require_once "../common.php"; require_once UPATH . "/header.php"; -if (!empty($_POST)) { +$rehash_errors = []; +$rehash_warnings = []; +$rehash_success = []; + +if (!empty($_POST)) +{ do_log($_POST); + if (isset($_POST['rehash'])) + foreach ($_POST['serverch'] as $servID) + if ($response = $rpc->server()->rehash($servID)) + { + $serb = $rpc->server()->get($servID); + do_log($servID, $response); + if ($response->success || (!isset($response->success) != false && $response == true)) + { + $rehash_success[] = $serb->name; + foreach($response->log as $log) + { + do_log($log->level); + if ($log->level == "warn") + $rehash_warnings[$log->log_source][] = $log->msg; + } + } + else if (isset($response->success) && !$response->success) + { + foreach ($response->log as $log) + { + if ($log->level == "error") + $rehash_errors[$log->log_source][] = $log->msg; + } + } + } } /* Get the server list */ $servers = $rpc->server()->getAll(); ?>
Filter: |
@@ -27,20 +97,38 @@ Click on a server name to view more information.
Name |
---|