Bot.Big.IsAllowed C# (CSharp) Method

IsAllowed() private method

private IsAllowed ( string ident, string host ) : bool
ident string
host string
return bool
        private bool IsAllowed(string ident, string host)
        {
            string key = ident + "@" + host;

            if (!_userLimit.ContainsKey(key)) {
                _userLimit.Add(key, DateTime.Now);
                return true;
            }
            if (DateTime.Now - _userLimit[key] >= new TimeSpan(0, _timeLimitMinutes, 0)) {
                _userLimit[key] = DateTime.Now;
                return true;
            }

            return false;
        }