Alles anzeigen
$mod->registerEvent("playerJoined", "iprangeban_main");$mod->setDefaultCV("iprangeban", "enabled", 0);
$mod->setDefaultCV("iprangeban", "range", "");
$mod->setDefaultCV("iprangeban", "allowed_guids", "");
$mod->setDefaultCV("iprangeban", "message", "Your IP is banned.");function iprangeban_main($guid) {
global $mod;
global $players;if ($mod->getCV("iprangeban", "enabled") == "0") {
return;
}$range_string = $mod->getCV("iprangeban", "range");
$allowed_guids = $mod->getCV("iprangeban", "allowed_guids");
// Spaltet die erlaubten GUIDS in ein array auf und überprüft ob die GUID von dem Connecteten enthalten ist.
if ("" != trim($range_string)) {
$allowed_guids_repl = str_replace(" ", "", $allowed_guids);
$array_guids = explode(";", $allowed_guids_repl);
foreach ($array_guids as $value) {
if ($guid == $value) {
return;
}
}
}
What ban commands ip?