mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Ban-IP fix + message
This commit is contained in:
parent
ed8f38ef55
commit
cef574015f
2 changed files with 9 additions and 3 deletions
|
|
@ -187,12 +187,12 @@ function serverCommands(){
|
|||
case "remove":
|
||||
$ip = trim(implode($params));
|
||||
$new = array();
|
||||
foreach(explode(file_get_contents(FILE_PATH."banned-ips.txt")) as $i){
|
||||
foreach(explode("\n", str_replace(array("\r","\t"), "", file_get_contents(FILE_PATH."banned-ips.txt"))) as $i){
|
||||
if($i == $ip){
|
||||
console("[INFO] IP \"$ip\" removed from ban list");
|
||||
continue;
|
||||
}
|
||||
$new[$ip] = $ip;
|
||||
$new[$i] = $i;
|
||||
}
|
||||
file_put_contents(FILE_PATH."banned-ips.txt", implode("\r\n", $new));
|
||||
loadConfig();
|
||||
|
|
@ -282,7 +282,7 @@ function serverCommands(){
|
|||
case "remove":
|
||||
$user = trim(implode(" ", $params));
|
||||
$new = array();
|
||||
foreach(explode(file_get_contents(FILE_PATH."white-list.txt")) as $u){
|
||||
foreach(explode("\n", str_replace(array("\r","\t"), "", file_get_contents(FILE_PATH."white-list.txt"))) as $u){
|
||||
if($u == $user){
|
||||
console("[INFO] Player \"$user\" removed from white-list");
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue