public static void parseTags() { string _data = IRCconnect._data; if (_data.StartsWith("@color=")) { string tags = _data.Substring(0, _data.IndexOf(" :")); info = TwitchCap.getTagValues(tags); } }
public static tagInfo getTagValues(string tagsFull) { tagInfo info = new tagInfo(); string[] tags = tagsFull.Split(';'); int i = 0; foreach (string tag in tags) { tags[i] = tag.Substring(tag.IndexOf("=") + 1); i++; } info.color = tags[0]; info.display_name = tags[1]; info.emote_sets = tags[2]; info.subscriber = tags[3]; info.turbo = tags[4]; info.user_type = tags[5]; return info; }