internal IrcChannelModeEventArgs(IrcMessage message) : base(message) { this.Who = message.From as IrcPeer; this.Channel = message.Parameters.Count > 0 ? new IrcTarget(message.Parameters[0]) : null; this.Modes = message.Parameters.Count > 1 ? IrcChannelMode.ParseModes(message.Parameters.Skip(1)) : null; }
/// <summary> /// Set or unset modes for a channel. /// </summary> /// <param name="channel">The channel on which to set modes.</param> /// <param name="modeSpec">The mode specification in the format +/-[modes] [parameters].</param> /// <remarks> /// Examples of the modeSpec parameter: /// +nst /// +i-ns /// -i+l 500 /// +bb [email protected] [email protected] /// </remarks> public void Mode(string channel, string modeSpec) { this.Mode(channel, IrcChannelMode.ParseModes(modeSpec)); }