Example #1
0
        public User(Hostmask hostmask, string modeString = "")
        {
            _hostmask     = hostmask;
            _internalUUID = Guid.NewGuid();
            bool?add = null;

            foreach (var chr in modeString)
            {
                switch (chr)
                {
                case '-':
                    add = false; continue;

                case '+':
                    add = true; continue;

                default:
                    if (add != null && (bool)add)
                    {
                        AddMode(chr);
                    }
                    if (add != null && !(bool)add)
                    {
                        RemoveMode(chr);
                    }
                    continue;
                }
            }

            UserCache.PutUser(this);
        }
Example #2
0
 private User(Hostmask hostmask, string modeString, Guid internalUuid) : this(hostmask, modeString)
 {
     _internalUUID = internalUuid;
 }