Aurora.Services.WebAPIHandler.GrantAPIAccess C# (CSharp) 메소드

GrantAPIAccess() 개인적인 메소드

private GrantAPIAccess ( string cmd ) : void
cmd string
리턴 void
        private void GrantAPIAccess(string[] cmd)
        {
            string name = MainConsole.Instance.Prompt("Name of user");

            OSDMap args = new OSDMap(1);
            args["Name"] = name;
            OSDMap resp = CheckIfUserExists(args);
            if ((!resp.ContainsKey("Verified") || !resp.ContainsKey("UUID")) || (!resp["Verified"].AsBoolean() || resp["UUID"].AsUUID() == UUID.Zero))
            {
                MainConsole.Instance.ErrorFormat("[" + Name + "]: {0} does not appear to exist.", name);
            }
            else
            {
                string method = MainConsole.Instance.Prompt("Name of method (leave blank to set default rate for all methods)", cmd.Length == 4 ? cmd[3].Trim() : "");
                uint rate = uint.Parse(MainConsole.Instance.Prompt("Hourly rate limit (zero for no limit)", "0"));
                m_connector.ChangeRateLimit(resp["UUID"].AsUUID(), method, rate);
            }
        }