$value) { foreach ($value as $tok) { $tok = explode(",", $tok); $ban = base64_decode($tok[0]); $type = base64_decode($tok[1]); if ($rpc->serverban()->delete($ban, $type)) Message::Success("$type has been removed for $ban"); else Message::Fail("Unable to remove $type on $ban: $rpc->error"); } } } else if (!($iphost = $_POST['tkl_add'])) Message::Fail("No user was specified"); else if (!($bantype = (isset($_POST['bantype'])) ? $_POST['bantype'] : false)) { Message::Fail("Unable to add Server Ban: No ban type selected"); } else /* It did */ { if (( $bantype == "gline" || $bantype == "gzline" || $bantype == "shun" || $bantype == "eline" ) && strpos($iphost, "@") == false) // doesn't have full mask $iphost = "*@" . $iphost; $soft = ($_POST['soft']) ? true : false; if ($soft) $iphost = "%" . $iphost; /* duplicate code for now [= */ $banlen_w = (isset($_POST['banlen_w'])) ? $_POST['banlen_w'] : NULL; $banlen_d = (isset($_POST['banlen_d'])) ? $_POST['banlen_d'] : NULL; $banlen_h = (isset($_POST['banlen_h'])) ? $_POST['banlen_h'] : NULL; $duration = ""; if (!$banlen_d && !$banlen_h && !$banlen_w) $duration .= "0"; else { if ($banlen_w) $duration .= $banlen_w; if ($banlen_d) $duration .= $banlen_d; if ($banlen_h) $duration .= $banlen_h; } $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)) { Message::Success("Host / IP: $iphost has been $bantype" . "d $msg_msg: $reason"); } else Message::Fail("The $bantype against \"$iphost\" could not be added: $rpc->error"); } } $tkl = $rpc->serverban()->getAll(); ?>
Add Server Ban
IP / Host:

Ban Type:



Don't affect logged-in users (soft)
"; echo ""; echo ""; echo ""; $set_by = ($tkl->set_by == "-config-") ? "Config" : $tkl->set_by; echo ""; echo ""; echo ""; echo ""; echo ""; } ?>
Select all Mask Type Set By Set On Expires Duration Reason ".$tkl->name."".$tkl->type_string."".$set_by."".$tkl->set_at_string."".$tkl->expire_at_string."".$tkl->duration_string."".$tkl->reason."