예제 #1
0
 /// <summary>
 /// Reads an <see cref="IRCSharp.IrcMessage"/> from the stream.
 /// </summary>
 /// <returns></returns>
 public IrcMessage ReadMessage()
 {
     IrcMessage message = new IrcMessage();
     string line = _reader.ReadLine();
     message.Parse(line);
     return message;
 }
예제 #2
0
        /// <summary>
        /// Reads an <see cref="IRCSharp.IrcMessage"/> from the stream.
        /// </summary>
        /// <returns></returns>
        public IrcMessage ReadMessage()
        {
            IrcMessage message = new IrcMessage();
            string     line    = _reader.ReadLine();

            message.Parse(line);
            return(message);
        }
예제 #3
0
        /// <summary>
        /// Parses a responce.
        /// </summary>
        /// <param name="line"></param>
        public void Parse(string line)
        {
            IrcMessage message = new IrcMessage();

            message.Parse(line);
            Host      = message.Prefix.Trim();
            NumericId = (IrcNumericResponceId)(int.Parse(message.Command));
            Extra     = string.Join(" ", message.Params, 0, message.Params.Length - 1).Trim();
            Message   = " :" + message.Params.Last().Trim();
        }
예제 #4
0
 /// <summary>
 /// Parses a responce.
 /// </summary>
 /// <param name="line"></param>
 public void Parse(string line)
 {
     IrcMessage message = new IrcMessage();
     message.Parse(line);
     Host = message.Prefix.Trim();
     NumericId = (IrcNumericResponceId)(int.Parse(message.Command));
     Extra = string.Join(" ", message.Params, 0, message.Params.Length - 1).Trim();
     Message = " :" + message.Params.Last().Trim();
 }