示例#1
0
文件: Commands.cs 项目: pie3467/aura
        /// <summary>
        /// Returns auth for command, or a new auth with the default values
        /// if the command wasn't found in the config.
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public CommandAuthConf GetAuth(string command, int defaultAuth, int defaultCharAuth)
        {
            CommandAuthConf result;
            this.Auth.TryGetValue(command, out result);
            if (result == null)
                result = new CommandAuthConf(defaultAuth, defaultCharAuth);

            return result;
        }
示例#2
0
        /// <summary>
        /// Returns auth for command, or a new auth with the default values
        /// if the command wasn't found in the config.
        /// </summary>
        /// <param name="command"></param>
        /// <param name="defaultAuth"></param>
        /// <param name="defaultCharAuth"></param>
        /// <returns></returns>
        public CommandAuthConf GetAuth(string command, int defaultAuth, int defaultCharAuth)
        {
            CommandAuthConf result;

            this.Auth.TryGetValue(command, out result);
            if (result == null)
            {
                result = new CommandAuthConf(defaultAuth, defaultCharAuth);
            }

            return(result);
        }