X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/c68cfb171b4302e594a9438b731f976eb04eae66..ea90b321a4b3768028d841b307c362af97a5e6e1:/users/index.php diff --git a/users/index.php b/users/index.php index a520ae9..dae4041 100644 --- a/users/index.php +++ b/users/index.php @@ -1,5 +1,6 @@ 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"); @@ -108,11 +116,12 @@ Click on a username to view more information. name="servicesonly" type="checkbox" value=""> Services Only - Nick - Host - IP - Account - Server + Nick: + Host: + IP: + Country: + Account: + Server: @@ -123,19 +132,22 @@ Click on a username to view more information. Nick - Host / IP + Country + Host / IP Account Usermodes ℹ️ - Oper - Secure - Connected to + Oper + Secure + Connected to Reputation ℹ️
name), strtolower($_POST['uf_nick'])) == false) continue; + /* Some basic filtering for COUNTRY */ + if (isset($_POST['uf_country']) && strlen($_POST['uf_country']) && + @strtolower($user->geoip->country_code) !== strtolower($_POST['uf_country'])) + continue; + /* Some basic filtering for HOST */ if (isset($_POST['uf_host']) && strlen($_POST['uf_host']) && strpos(strtolower($user->hostname), strtolower($_POST['uf_host'])) !== 0 && @@ -160,11 +177,10 @@ Click on a username to view more information. /* 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) + strtolower($user->user->account) !== strtolower($_POST['uf_account'])) continue; - /* Some basic filtering for ACCOUNT */ + /* Some basic filtering for SERVER */ if (isset($_POST['uf_server']) && strlen($_POST['uf_server']) && strpos(strtolower($user->user->servername), strtolower($_POST['uf_server'])) !== 0 && strpos(strtolower($user->user->servername), strtolower($_POST['uf_server'])) == false) @@ -184,26 +200,34 @@ Click on a username to view more information. echo ""; $isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : ""; echo "id."\">$user->name$isBot"; - echo "".htmlspecialchars($user->hostname)." (".htmlspecialchars($user->ip ?? "None").")"; - $account = (isset($user->user->account)) ? "user->account."\">".htmlspecialchars($user->user->account)."" : 'None'; + echo "".(isset($user->geoip->country_code) ? ' '.$user->geoip->country_code : "").""; + echo "".htmlspecialchars($user->hostname)." (".($user->hostname == $user->ip ? 'the same' : htmlspecialchars($user->ip ?? "None")).")"; + $account = (isset($user->user->account)) ? "user->account."\">".htmlspecialchars($user->user->account)."" : 'None'; echo "".$account.""; $modes = (isset($user->user->modes)) ? "+" . $user->user->modes : ""; echo "".$modes.""; $oper = (isset($user->user->operlogin)) ? $user->user->operlogin." ".$user->user->operclass."" : ""; if (!strlen($oper)) $oper = (strpos($user->user->modes, "S") !== false) ? 'Services Bot' : ""; - echo "".$oper.""; + echo "".$oper.""; $secure = (isset($user->tls) || $user->hostname !== "localhost") ? "Secure" : "Insecure"; if (strpos($user->user->modes, "S") !== false) $secure = ""; - echo "".$secure.""; - echo "id, 0, 3)."\">".$user->user->servername.""; + echo "".$secure.""; + echo "id, 0, 3)."\">".$user->user->servername.""; echo "".$user->user->reputation.""; echo ""; + $currentNumberUsers++; + if (isset($user->user->account)) + $currentNumberUsersIdentified++; + if (isset($user->geoip->country_code)) + array_push($registrationOfaAllFlags, $user->geoip->country_code); } + $registrationOfaAllFlags = array_count_values($registrationOfaAllFlags); ?> +
connected users including identified and not identified.
@@ -213,6 +237,7 @@ Click on a username to view more information. + @@ -258,12 +283,14 @@ Click on a username to view more information. } ?> -
+ + +
- +
@@ -288,14 +315,50 @@ Click on a username to view more information. - - + + +

Top country

+
+
    + $count){ + echo '
  • +

    + '.$country_code . ' +
    +
    ' . $count . ' connected
    +
  • '; + } + ?> +
+
+ + +