X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/ce3de10120fe10fb22ec79242fc3dc106eaa9a9d..39330628e8c0719660d6adaf6171b855f69513e7:/users/index.php diff --git a/users/index.php b/users/index.php index 8978405..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(); ?>
Filter: |
-
-
---|