From 4d37b79ff7f9d9452e988387f97919a9a1c4954e Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 15 Dec 2021 01:08:59 +0000 Subject: [PATCH] Server: fixed not being able to deop players whose names were added to ops.txt with uppercase letters in them same as iTXTech/Genisys#1204 why didn't anyone report this??? --- src/Server.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Server.php b/src/Server.php index f40667786..b776b20eb 100644 --- a/src/Server.php +++ b/src/Server.php @@ -694,7 +694,13 @@ class Server{ } public function removeOp(string $name) : void{ - $this->operators->remove(strtolower($name)); + $lowercaseName = strtolower($name); + foreach($this->operators->getAll() as $operatorName => $_){ + $operatorName = (string) $operatorName; + if($lowercaseName === strtolower($operatorName)){ + $this->operators->remove($operatorName); + } + } if(($player = $this->getPlayerExact($name)) !== null){ $player->unsetBasePermission(DefaultPermissions::ROOT_OPERATOR);