Пример #1
0
 public override void Execute(string commandArgs)
 {
     if (FileHandler.FileExists(Path.Combine(ServerContext.UniverseDirectory, "Players", commandArgs + ".txt")))
     {
         if (!Exists(commandArgs))
         {
             LunaLog.Debug("Added '" + commandArgs + "' to admin list.");
             Add(commandArgs);
             AdminSystemSender.NotifyPlayersNewAdmin(commandArgs);
         }
     }
     else
     {
         LunaLog.Normal("'" + commandArgs + "' does not exist.");
     }
 }
Пример #2
0
        public override void Execute(string commandArgs)
        {
            if (FileHandler.FileExists(Path.Combine(ServerContext.UniverseDirectory, "Players", $"{commandArgs}.txt")))
            {
                if (Exists(commandArgs))
                {
                    return;
                }

                LunaLog.Debug($"Added '{commandArgs}' to admin list.");
                Add(commandArgs);
                AdminSystemSender.NotifyPlayersNewAdmin(commandArgs);
            }
            else
            {
                LunaLog.Normal($"'{commandArgs}' does not exist.");
            }
        }