quick rename on logger CommandGroup.cs and CommandManager.cs;

Show Min privilege on command if it's a debug mode. TODO: Change to Unknown command instead.
This commit is contained in:
Lucca Faria Ferri 2023-01-28 06:19:13 -08:00
parent b718418551
commit fbb3a0295f
2 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,7 @@ namespace DiIiS_NA.GameServer.CommandManager
{
public class CommandGroup
{
private static readonly Logger Logger = LogManager.CreateLogger("Commands");
private static readonly Logger Logger = LogManager.CreateLogger("CmdGrp");
public CommandGroupAttribute Attributes { get; private set; }
@ -83,7 +83,11 @@ namespace DiIiS_NA.GameServer.CommandManager
// check if the user has enough privileges to invoke the command.
if (invokerClient != null && target.MinUserLevel > invokerClient.Account.UserLevel)
#if DEBUG
return $"You don't have enough privileges to invoke that command (Min. level: {Attributes.MinUserLevel}).";
#else
return "You don't have enough privileges to invoke that command.";
#endif
return (string)_commands[target].Invoke(this, new object[] { @params, invokerClient });
}

View File

@ -11,7 +11,7 @@ namespace DiIiS_NA.GameServer.CommandManager
{
public static class CommandManager
{
private static readonly Logger Logger = LogManager.CreateLogger("CM");
private static readonly Logger Logger = LogManager.CreateLogger("CmdMan");
private static readonly Dictionary<CommandGroupAttribute, CommandGroup> CommandGroups = new Dictionary<CommandGroupAttribute, CommandGroup>();
static CommandManager()