private void DoCTCPParsed(string channelName, string userName, string message) { Channel channel = channels.Find(c => c.ChannelName == channelName); if (channel == null) { return; } channel.OnCTCPReceived(userName, message); }
private void DoCTCPParsed(string channelName, string userName, string message) { Channel channel = FindChannel(channelName); // it's possible that we received this CTCP via PRIVMSG, in which case we // expect our username instead of a channel as the first parameter if (channel == null) { if (channelName == ProgramConstants.PLAYERNAME) { PrivateCTCPEventArgs e = new PrivateCTCPEventArgs(userName, message); PrivateCTCPReceived?.Invoke(this, e); } return; } channel.OnCTCPReceived(userName, message); }