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