X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/f10794036cb7c1a60ebfe26bf08d138e5c529b11..a20d0d3934d18fb0c116461c0e0406d8b2e1f982:/index.php
diff --git a/index.php b/index.php
index 32b849d..dbd4e03 100644
--- a/index.php
+++ b/index.php
@@ -1,16 +1,41 @@
query("stats.get", []);
+$stats = $rpc->stats()->get();
?>
+
+
Network Overview
+âªLIVE
+
+Network Overview
+/* What if someone wants to add their own stats... */
+Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats);
-
+/* This makes sure that a plugin which called the parameter
+ * by reference can add/update the stats for display here.
+*/
+$stats = (object) $array_of_stats;
-
-
+$userlist = [];
+Hook::run(HOOKTYPE_GET_USER_LIST, $userlist);
+$num_of_panel_admins = count($userlist);
+
+?>
+
+
+
+
+
@@ -29,14 +54,14 @@ $stats = $rpc->query("stats.get", []);
Users Online
-
+
-
+
@@ -53,12 +78,12 @@ $stats = $rpc->query("stats.get", []);
Channels
-
+
-
+
@@ -75,14 +100,13 @@ $stats = $rpc->query("stats.get", []);
Opers
-
-
+
-
+
@@ -99,17 +123,17 @@ $stats = $rpc->query("stats.get", []);
Servers
-
+
-
+
-
+
@@ -126,12 +150,12 @@ $stats = $rpc->query("stats.get", []);
Server Bans
-
+
-
+
@@ -148,12 +172,12 @@ $stats = $rpc->query("stats.get", []);
Spamfilter
-
+
-
+
@@ -171,7 +195,7 @@ $stats = $rpc->query("stats.get", []);
Server Ban Exceptions
-
+
@@ -179,17 +203,12 @@ $stats = $rpc->query("stats.get", []);
server->ulined) {
$bg = "bg-success";
-
- /* honestly can't think of a case where there would actually be only one uline... but... well here we are, worrying over the small stuff =] */
- $user_noun = ($stats->user->ulined == 1) ? "user" : "users"; // use "users" even if 0, sounds better.
- $is_are = ($stats->user->ulined == 1) ? "is" : "are";
- $server_noun = ($stats->server->ulined == 1) ? "server" : "servers";
- $tooltip = "There $is_are " . $stats->user->ulined . " U-Lined $user_noun over " . $stats->server->ulined . " U-Lined $server_noun";
+ $tooltip = "Users / Servers";
}
else
$bg = "bg-warning";
?>
-
+
@@ -206,7 +226,7 @@ $stats = $rpc->query("stats.get", []);
Services Online
-
+
@@ -215,6 +235,86 @@ $stats = $rpc->query("stats.get", []);
+
+
+
+