Set the correct variable
Add checks for rank to MODE command permission check