]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - server_bans.php
Some visual enhancements
[irc/unrealircd/unrealircd-webpanel.git] / server_bans.php
index 524bbeddfd45a8b0fcf8cb00dae6d421f09c09e2..fd009fe9ee5f607ffbfb46fe1c1ee0d046cd334a 100644 (file)
@@ -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;
 ?>
 <h4>Server Bans Overview</h4><br>
 <p><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
@@ -184,7 +195,7 @@ foreach ($rpc->nameban()->getAll() as $v)
        </div>
        </div>
 
-       <table class="table table-responsive caption-top table-striped">
+       <table class="container-xxl table table-responsive caption-top table-striped">
        <thead class="table-primary">
        <form method="post">
        <th><input type="checkbox" label='selectall' onClick="toggle_tkl(this)" /></th>