Example #1
0
        public UserData GetUserData(string userid)
        {
            UserData data;
            if (!userdata.TryGetValue(userid, out data))
            {
                data = new UserData { LastSeenNickname = string.Empty, Groups = new HashSet<string>(), Perms = new HashSet<string>() };
                userdata.Add(userid, data);
            }

            // Return the data
            return data;
        }
Example #2
0
        /// <summary>
        /// Returns the data for the specified user
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        private UserData GetUserData(string id)
        {
            UserData data;
            if (!userdata.TryGetValue(id, out data)) userdata.Add(id, data = new UserData());

            // Return the data
            return data;
        }