aatxe / irc

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

Failed to parse MODE message #48

Closed FreeFull closed 7 years ago

FreeFull commented 8 years ago

( Edited error to make person and channel names private )

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Custom(Custom { kind: InvalidInput, error: StringError("Failed to parse message. (Message: :Nick!~user@insert.hostname MODE #channel +ao ClientTesttest ClientTesttest\r\n)") }) }', ../src/libcore/result.rs:746

It seems to only happen when more than one mode is given in a single message

aatxe commented 8 years ago

This is a known bug in v0.10.0. v0.11.0 and on have a minor resolution which is that messages will be parsed into Command::Raw, but ultimately, the implementation for parsing Command::MODE needs to be overhauled to work correctly to spec. So, for now, update to the latest version, but this is something that needs to be fixed better.

FreeFull commented 8 years ago

Ah, thanks. I didn't notice there is a newer version available.

Edit: Seems that updating did stop it from crashing.