X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/dd6ce63fab39768899e3323af5669f2b47ad68fe..c06c1713af2db485d55a91073bbc5b63b6aa8c0b:/users/index.php diff --git a/users/index.php b/users/index.php index 13527b3..2e8cf75 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"); } @@ -52,9 +86,10 @@ $users = $rpc->user()->getAll(); Click on a username to view more information. -
+
- - - - - + + + + + + + + + + + + + + +
Filter:
Nick - Host IP Account
Filter:
name="operonly" type="checkbox" value=""> Opers Only name="servicesonly" type="checkbox" value=""> Services Only
Nick: + Host: IP: Country: Account: Server:
- +
- - - - - - - + + + + + + + + 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 && @@ -120,33 +177,63 @@ 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; - echo ""; + /* 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) + continue; + + /* Some basic filtering for OPER */ + if (isset($_POST['operonly']) && + (strpos($user->user->modes, "o") == false || strpos($user->user->modes,"S") !== false)) + continue; + + /* Some basic filtering for SERVICES */ + if (isset($_POST['servicesonly']) && + (strpos($user->user->modes,"S") == false)) + continue; + + echo "\nid\" value=\"$user->name\" class=\"userselector\">"; echo ""; - $isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : ""; + $isBot = (strpos($user->user->modes, "B") !== false) ? ' Bot' : ""; echo ""; - echo ""; - $account = (isset($user->user->account)) ? $user->user->account : 'None'; - echo ""; + echo ""; + if ($user->hostname == $user->ip) + $hostip = $user->ip; + else if ($user->ip == null) + $hostip = $user->hostname; + else + $hostip = $user->hostname . " (".$user->ip.")"; + echo ""; + $account = (isset($user->user->account)) ? "user->account."\">".htmlspecialchars($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."" : ""; + 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 ""; + $oper = (strpos($user->user->modes, "S") !== false) ? 'Services Bot' : ""; + echo ""; - $secure = (isset($user->tls)) ? "Secure" : "Insecure"; + $secure = (isset($user->tls) || $user->hostname !== "localhost") ? "Secure" : "Insecure"; if (strpos($user->user->modes, "S") !== false) $secure = ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + 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); ?>
NickHost / IPAccountUsermodes ℹ️OperSecureConnected toReputation ℹ️CountryHost / IPAccountUsermodes ℹ️OperSecureConnected toRep. ℹ️
id."\">$user->name$isBot".$user->hostname." (".$user->ip.")".$account."".(isset($user->geoip->country_code) ? ' '.$user->geoip->country_code : "")."".htmlspecialchars($hostip)."".$account."".$modes."".$modes."".$oper."".$oper."".$secure."".$user->user->servername."".$user->user->reputation."".$secure."id, 0, 3)."\">".$user->user->servername."".$user->user->reputation."
+
connected users including identified and not identified.
@@ -156,6 +243,7 @@ Click on a username to view more information. + @@ -201,12 +289,14 @@ Click on a username to view more information. } ?> -
+ + +
- +
@@ -231,14 +321,159 @@ Click on a username to view more information.
- -
+ + + + - +