Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Fixes #1188
Browse files Browse the repository at this point in the history
In case ops.txt was modified directly and op names were added with
uppercase letters, these players can now be de-opped.
  • Loading branch information
dktapps committed Jun 18, 2016
1 parent 3a372a4 commit 4361ba7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pocketmine/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,12 @@ public function addOp($name){
* @param string $name
*/
public function removeOp($name){
$this->operators->remove(strtolower($name));

foreach($this->operators->getAll() as $opName => $dummyValue){
if(strtolower($name) === strtolower($opName)){
$this->operators->remove($opName);
}
}

if(($player = $this->getPlayerExact($name)) !== null){
$player->recalculatePermissions();
}
Expand Down

0 comments on commit 4361ba7

Please sign in to comment.