Example #1
0
        /// <summary>
        /// Listen for the 005 info messages sent during registration so that the maximum lengths
        /// of certain items (Nick, Away, Topic) can be determined dynamically.
        /// </summary>
        private void OnReply(object sender, ReplyEventArgs a)
        {
            if (a.ReplyCode != ReplyCode.RPL_BOUNCE)
            {
                return;
            }

            //Populate properties from name/value matches
            MatchCollection matches = _propertiesRegex.Matches(a.Message);

            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                {
                    _properties.SetProperty(match.Groups[1].ToString(), match.Groups[2].ToString());
                }
            }
            //Extract ones we are interested in
            ExtractProperties();
        }
Example #2
0
        /// <summary>
        /// Listen for the 005 info messages sent during registration so that the maximum lengths
        /// of certain items (Nick, Away, Topic) can be determined dynamically.
        /// </summary>
        private void OnReply(object sender, ReplyEventArgs a)
        {
            if (a.ReplyCode != ReplyCode.RPL_BOUNCE) return;

            //Populate properties from name/value matches
            MatchCollection matches = _propertiesRegex.Matches(a.Message);
            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                    _properties.SetProperty(match.Groups[1].ToString(), match.Groups[2].ToString());
            }
            //Extract ones we are interested in
            ExtractProperties();
        }