X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/dd6ce63fab39768899e3323af5669f2b47ad68fe..d5ffb4bb26cc3910c5e4da8de0f6ed8e64a273fa:/users/index.php diff --git a/users/index.php b/users/index.php index 13527b3..4512c1b 100644 --- a/users/index.php +++ b/users/index.php @@ -1,17 +1,37 @@ user()->get($user); + if (!$user && $bantype !== "qline") { Message::Fail("Could not find that user: User not online"); - } else { + } + + else + { $msg_msg = ($duration == "0" || $duration == "0w0d0h") ? "permanently" : "for " . rpc_convert_duration_string($duration); $reason = (isset($_POST['ban_reason'])) ? $_POST['ban_reason'] : "No reason"; + if ($bantype == "qline") $rpc->nameban()->add($name, $reason, $duration); + + else if ($bantype == "kill") + { + if ($rpc->user()->kill($user->id, $reason)) + Message::Success($user->name . "(*@" . $user->hostname . ") has been killed: $reason"); + else + Message::Fail("Could not kill $user->name: $rpc->error"); + } else if ($rpc->serverban()->add($user->id, $bantype, $duration, $reason)) Message::Success($user->name . " (*@" . $user->hostname . ") has been $bantype" . "d $msg_msg: $reason"); + else Message::Fail("Could not add $bantype against $name: $rpc->error"); } @@ -45,108 +79,29 @@ if (!empty($_POST)) { } } -/* Get the user list */ -$users = $rpc->user()->getAll(); ?>

Users Overview

Click on a username to view more information. -
- - - - - - - - - - -
Filter:
Nick - Host IP Account
- - +
+
+ + +
- - - - - - - + + + + + + - - - - - foreach($users as $user) - { - - - /* 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; - - /* 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; - - /* 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; - - echo ""; - echo ""; - $isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : ""; - echo ""; - echo ""; - $account = (isset($user->user->account)) ? $user->user->account : 'None'; - echo ""; - $modes = (isset($user->user->modes)) ? "+" . $user->user->modes : ""; - echo ""; - $oper = (isset($user->user->operlogin)) ? $user->user->operlogin." ".$user->user->operclass."" : ""; - if (!strlen($oper)) - $oper = (strpos($user->user->modes, "S") !== false) ? 'Services Bot' : ""; - echo ""; - - $secure = (isset($user->tls)) ? "Secure" : "Insecure"; - if (strpos($user->user->modes, "S") !== false) - $secure = ""; - echo ""; - echo ""; - echo ""; - } - ?> -
NickHost / IPAccountUsermodes ℹ️OperSecureConnected toReputation ℹ️CountryHost / IPAccountOperConnected toRep. ℹ️
id."\">$user->name$isBot".$user->hostname." (".$user->ip.")".$account."".$modes."".$oper."".$secure."".$user->user->servername."".$user->user->reputation."
+
@@ -156,6 +111,7 @@ Click on a username to view more information. + @@ -201,18 +157,22 @@ Click on a username to view more information. } ?> -
+ + +
- -
-