Skip to content

Commit

Permalink
Fix 'classicube.net account not verified' being shown before 'you do …
Browse files Browse the repository at this point in the history
…not have permission to use this command' message
  • Loading branch information
UnknownShadow200 committed Jul 5, 2017
1 parent cd295d9 commit 72eca73
Showing 1 changed file with 19 additions and 29 deletions.
48 changes: 19 additions & 29 deletions fCraft/Commands/CommandManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,46 +232,36 @@ public static bool ParseCommand([NotNull] Player player, [NotNull] CommandReader
player.Message("Unknown command \"{0}\". See &H/Commands", cmd.Name);
return false;
}

if (!descriptor.IsConsoleSafe && fromConsole)
{
player.Message("You cannot use this command from console.");
return false;
}
else

if (descriptor.Permissions != null)
{
if (!descriptor.CanBeCalledBy(player.Info.Rank))
{
player.MessageNoAccess(descriptor);
return false;
}

if (descriptor.MinRank != RankManager.LowestRank && !player.Info.ClassicubeVerified) {
player.Message("As you had an older minecraft.net account, you must have an admin verify your " +
"new classicube.net account actually is you with /verify before you can use non-guest commands.");
return false;
}
if (descriptor.Permissions != null)
{
if (!descriptor.CanBeCalledBy(player.Info.Rank))
{
player.MessageNoAccess(descriptor);
}
else if (!descriptor.Call(player, cmd, true))
{
player.Message("Command was cancelled.");
}
else
{
return true;
}
}
else
{
if (descriptor.Call(player, cmd, true))
{
return true;
}
else
{
player.Message("Command was cancelled.");
}
}
}
return false;

if (descriptor.Call(player, cmd, true))
{
return true;
}
else
{
player.Message("Command was cancelled.");
return false;
}
}


Expand Down

0 comments on commit 72eca73

Please sign in to comment.