private bool CheckPing() { if (!RawMessage.StartsWith("PING")) { return(false); } IsPing = true; Args = string.Concat("PONG ", RawMessage.Substring(5)); return(true); }
/// <summary> /// For parsing IRCv3 message tags /// </summary> private void ParseTagsPrefix() { if (!RawMessage.StartsWith("@")) { return; } IsIRCv3Message = true; string fullTagsPrefix = RawMessage.Substring(0, RawMessage.IndexOf(' ')); string[] primitiveTagsCollection = RawMessage.Split(';'); foreach (string[] splitPrimitiveTag in primitiveTagsCollection.Select(primitiveTag => primitiveTag.Split('='))) { Tags.Add(splitPrimitiveTag[0], splitPrimitiveTag[1] ?? string.Empty); } }