Skip to content

Commit 72eca73

Browse files
Fix 'classicube.net account not verified' being shown before 'you do not have permission to use this command' message
1 parent cd295d9 commit 72eca73

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

fCraft/Commands/CommandManager.cs

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -232,46 +232,36 @@ public static bool ParseCommand([NotNull] Player player, [NotNull] CommandReader
232232
player.Message("Unknown command \"{0}\". See &H/Commands", cmd.Name);
233233
return false;
234234
}
235-
236235
if (!descriptor.IsConsoleSafe && fromConsole)
237236
{
238237
player.Message("You cannot use this command from console.");
238+
return false;
239239
}
240-
else
240+
241+
if (descriptor.Permissions != null)
241242
{
243+
if (!descriptor.CanBeCalledBy(player.Info.Rank))
244+
{
245+
player.MessageNoAccess(descriptor);
246+
return false;
247+
}
248+
242249
if (descriptor.MinRank != RankManager.LowestRank && !player.Info.ClassicubeVerified) {
243250
player.Message("As you had an older minecraft.net account, you must have an admin verify your " +
244251
"new classicube.net account actually is you with /verify before you can use non-guest commands.");
245252
return false;
246253
}
247-
if (descriptor.Permissions != null)
248-
{
249-
if (!descriptor.CanBeCalledBy(player.Info.Rank))
250-
{
251-
player.MessageNoAccess(descriptor);
252-
}
253-
else if (!descriptor.Call(player, cmd, true))
254-
{
255-
player.Message("Command was cancelled.");
256-
}
257-
else
258-
{
259-
return true;
260-
}
261-
}
262-
else
263-
{
264-
if (descriptor.Call(player, cmd, true))
265-
{
266-
return true;
267-
}
268-
else
269-
{
270-
player.Message("Command was cancelled.");
271-
}
272-
}
273254
}
274-
return false;
255+
256+
if (descriptor.Call(player, cmd, true))
257+
{
258+
return true;
259+
}
260+
else
261+
{
262+
player.Message("Command was cancelled.");
263+
return false;
264+
}
275265
}
276266

277267

0 commit comments

Comments
 (0)