private void IrcTopicChanged(string[] ircCommand) { string ircChannel = ircCommand[2]; string ircUser = ircCommand[0].Split('!')[0]; if (!ChannelsIn.Contains(ircChannel)) { ChannelsIn.Add(ircChannel); } string ircTopic = ""; for (int intI = 4; intI < ircCommand.Length; intI++) { ircTopic += ircCommand[intI] + " "; } if (TopicChanged != null) { try { TopicChanged(ircUser, ircChannel, ircTopic.Remove(0, 1).Trim()); } catch (ArgumentException) { //TODO: figure out why this error happens. } } }
private void IrcTopic(string[] ircCommand) { string ircChannel = ircCommand[3]; if (!ChannelsIn.Contains(ircChannel)) { ChannelsIn.Add(ircChannel); } string ircTopic = ""; for (int intI = 4; intI < ircCommand.Length; intI++) { ircTopic += ircCommand[intI] + " "; } if (TopicSet != null) { TopicSet(ircChannel, ircTopic.Remove(0, 1).Trim()); } }