mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 23:29:54 +00:00
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???
This commit is contained in:
parent
ea1fceece2
commit
4d37b79ff7
@ -694,7 +694,13 @@ class Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function removeOp(string $name) : void{
|
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){
|
if(($player = $this->getPlayerExact($name)) !== null){
|
||||||
$player->unsetBasePermission(DefaultPermissions::ROOT_OPERATOR);
|
$player->unsetBasePermission(DefaultPermissions::ROOT_OPERATOR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user