X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/fe2a6f275bbe952f2eed1bd7314ebae7c2e8bc72..5979a76ab758b4d8bcee5ba99338d8645b9ec5cc:/tkl.php diff --git a/tkl.php b/tkl.php index 8227e91..d387dff 100644 --- a/tkl.php +++ b/tkl.php @@ -62,7 +62,21 @@ if (!empty($_POST)) } $msg_msg = ($duration == "0" || $duration == "0w0d0h") ? "permanently" : "for ".rpc_convert_duration_string($duration); $reason = (isset($_POST['ban_reason'])) ? $_POST['ban_reason'] : "No reason"; - if ($rpc->serverban()->add($iphost, $bantype, $duration, $reason)) + if ($bantype == "qline") + { + if ($rpc->nameban()->add($iphost, $reason, $duration)) + Message::Success("Name Ban set against \"$iphost\": $reason"); + else + Message::Fail("Name Ban could not be set against \"$iphost\": $rpc->error"); + } + elseif ($bantype == "except") + { + if ($rpc->exception()->add($iphost, "", $duration, $reason)) + Message::Success("Exception set for \"$iphost\": $reason"); + else + Message::Fail("Exception could not be set \"$iphost\": $rpc->error"); + } + else if ($rpc->serverban()->add($iphost, $bantype, $duration, $reason)) { Message::Success("Host / IP: $iphost has been $bantype" . "d $msg_msg: $reason"); } @@ -72,15 +86,27 @@ if (!empty($_POST)) } $tkl = $rpc->serverban()->getAll(); +foreach ($rpc->nameban()->getAll() as $v) + $tkl[] = $v; ?> -
- Add Server Ban -
-
+

Server Bans Overview


+

+ - - + +
+ + @@ -159,6 +195,7 @@ $tkl = $rpc->serverban()->getAll(); + serverban()->getAll(); echo ""; echo ""; echo ""; - echo ""; + $set_by = ($tkl->set_by == "-config-") ? "Config" : $tkl->set_by; + echo ""; echo ""; echo ""; echo ""; echo ""; } - ?>
Select all Mask TypeExpires Duration Reason
".$tkl->name."".$tkl->type_string."".$tkl->set_by."".$set_by."".$tkl->set_at_string."".$tkl->expire_at_string."".$tkl->duration_string."".$tkl->reason."

+ ?>

+