X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/bf5527b102d81fb4e9da90e252a38bc22ea628fe..3ca012c96f78bc8a64a17d49d31c317a9a9466d6:/index.php diff --git a/index.php b/index.php index 9579901..57c2213 100644 --- a/index.php +++ b/index.php @@ -1,491 +1,335 @@ - -UnrealIRCd Panel - - - -
-

UnrealIRCd Administration Panel

- -
- Overview - Users - Channels - Server Bans - Spamfilter - News -
user()->get($user); - if (!$nick) - { - Message::Fail("Could not find that user. Maybe they disconnected after you clicked this?"); - return; - } +?> +
+

Network Overview

+ +
+serverban()->add($user, $bantype, $duration, $reason)) - { - $c = $nick->client; - Message::Success($c->name . " (*@".$c->hostname.") has been $bantype" . "d $msg_msg: $reason"); - } - } - } +/* What if someone wants to add their own stats... */ +Hook::run(HOOKTYPE_PRE_OVERVIEW_CARD, $array_of_stats); - if (!empty($_POST['tklch'])) - foreach ($_POST as $key => $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - $ban = base64_decode($tok[0]); - $type = base64_decode($tok[1]); - if ($rpc->serverban()->delete($ban, $type)) - Message::Success("$type has been removed for $ban"); - else - Message::Fail("Unable to remove $type on $ban: $rpc->error"); - } - } +/* 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; - if (!empty($_POST['sf'])) - foreach ($_POST as $key => $value) { - foreach ($value as $tok) { - $tok = explode(",", $tok); - $name = base64_decode($tok[0]); - $match_type = base64_decode($tok[1]); - $spamfilter_targets = base64_decode($tok[2]); - $ban_action = base64_decode($tok[3]); - if ($rpc->spamfilter()->delete($name, $match_type, $spamfilter_targets, $ban_action)) - Message::Success("Spamfilter on $name has been removed"); - else - Message::Fail("Unable to remove spamfilter on $name: $rpc->error"); - } - } -} +$userlist = []; +Hook::run(HOOKTYPE_GET_USER_LIST, $userlist); +$num_of_panel_admins = count($userlist); -rpc_pop_lists(); ?> + +
-
-
- - - - - - - - - -
Chat Overview
Users
Opers
Services
Most popular channel ( users)
Channels
Server bans
Spamfilter entries
- -
-
- - - - - - - -
Filter by: -
- Nick: - -
-
-
- Hostname: - -
-
-
- IP: - -
-
-
- Account: - -
-
- +
+
+
+
+
+ + + +
+
+

+
+
+
+
+
+
+
Users Online
+
+ +
+
+
+ - if (isset($_POST['uf_account']) && strlen($_POST['uf_account'])) - Message::Info("Listing users which match account: \"" . $_POST['uf_account'] . "\""); +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Channels
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Opers
+
+ +
+
+
+
- ?> - - - - - - - - - - - - - - +
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Servers
+
+ +
+
+
+ + + +
- /* Some basic filtering for NICK */ - if (isset($_POST['uf_nick']) && strlen($_POST['uf_nick']) && - strpos(strtolower($user->name), strtolower($_POST['uf_nick'])) !== 0 && - strpos(strtolower($user->name), strtolower($_POST['uf_nick'])) == false) - continue; +
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Server Bans
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Spamfilter
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+

+
+
+
- /* Some basic filtering for HOST */ - if (isset($_POST['uf_host']) && strlen($_POST['uf_host']) && - strpos(strtolower($user->hostname), strtolower($_POST['uf_host'])) !== 0 && - strpos(strtolower($user->hostname), strtolower($_POST['uf_host'])) == false) - continue; +
+
+
+
Server Ban Exceptions
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+ +

+
+
+
+
+
+
+
Services Online
+
+ +
+
+ +
+
+
+
- /* Some basic filtering for IP */ - if (isset($_POST['uf_ip']) && strlen($_POST['uf_ip']) && - strpos(strtolower($user->ip), strtolower($_POST['uf_ip'])) !== 0 && - strpos(strtolower($user->ip), strtolower($_POST['uf_ip'])) == false) - continue; - /* Some basic filtering for ACCOUNT */ - if (isset($_POST['uf_account']) && strlen($_POST['uf_account']) && - strpos(strtolower($user->user->account), strtolower($_POST['uf_account'])) !== 0 && - strpos(strtolower($user->user->account), strtolower($_POST['uf_account'])) == false) - continue; + +
+
+
+
+
+
+
+ +
+
+

+
+
+
+
+
+
+
Panel Accounts
+
+ +
+
+
+
+
+
+ -
- - -
- - +Hook::run(HOOKTYPE_OVERVIEW_CARD, $stats); + +require_once "inc/footer.php";
Select allNickUIDHost / IPAccountUsermodesℹ️OperSecureConnected toReputation ℹ️