aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
533 stars 98 forks source link

send_mode(target, modes) only sends first mode when more then one mode is specified. #240

Open Ep0chalypse opened 2 years ago

Ep0chalypse commented 2 years ago

When using either Client or Sender's send_mode(target, modes) function only the first mode in the array is set.

For example this will only set mode #channel +v nickname

sender.send_mode(&channel, &[
          Mode::Plus(ChannelMode::Voice, Some(nickname.to_string())),
          Mode::Plus(ChannelMode::Oper, Some(nickname.to_string()))
 ])?;

Or this will only set mode #channel +o nickname

sender.send_mode(&channel, &[
          Mode::Plus(ChannelMode::Oper, Some(nickname.to_string())),
          Mode::Plus(ChannelMode::Voice, Some(nickname.to_string()))
 ])?;

Other info: