X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/7969b0e3cf3739b74acf34e573338d378c291b14..75c101fdf81cf76433e974b2dd9194aadbd75549:/server_bans.php diff --git a/server_bans.php b/server_bans.php index 524bbed..fd009fe 100644 --- a/server_bans.php +++ b/server_bans.php @@ -15,7 +15,16 @@ if (!empty($_POST)) $tok = explode(",", $tok); $ban = base64_decode($tok[0]); $type = base64_decode($tok[1]); - if ($rpc->serverban()->delete($ban, $type)) + $success = false; + if ($type == "except") + $success = $rpc->serverbanexception()->delete($ban); + else if ($type == "qline" || $type == "local-qline") + $success = $rpc->nameban()->delete($ban); + else + $success = $rpc->serverban()->delete($ban, $type); + + + if ($success) Message::Success("$type has been removed for $ban"); else Message::Fail("Unable to remove $type on $ban: $rpc->error"); @@ -71,7 +80,7 @@ if (!empty($_POST)) } elseif ($bantype == "except") { - if ($rpc->exception()->add($iphost, "", $duration, $reason)) + if ($rpc->serverbanexception()->add($iphost, "", $duration, $reason)) Message::Success("Exception set for \"$iphost\": $reason"); else Message::Fail("Exception could not be set \"$iphost\": $rpc->error"); @@ -88,6 +97,8 @@ if (!empty($_POST)) $tkl = $rpc->serverban()->getAll(); foreach ($rpc->nameban()->getAll() as $v) $tkl[] = $v; +foreach ($rpc->serverbanexception()->getAll() as $v) + $tkl[] = $v; ?>

Server Bans Overview