예제 #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);
        }
예제 #2
0
 private User(Hostmask hostmask, string modeString, Guid internalUuid) : this(hostmask, modeString)
 {
     _internalUUID = internalUuid;
 }
예제 #3
0
 public Message(Hostmask hostmask, string target, string message)
 {
     this.hostmask = hostmask;
     this.target   = target;
     this.message  = message;
 }