Closed martinetd closed 3 years ago
Yeah, I think it's fine to take no modifier at all as being an inquiry.
Just bumping this to say that I would accept such a pull request (given testing). While #22 was abandoned, I would like the protocol crate to be sufficient for anyone wishing to actually build a server, and I agree that the current behavior is actually incorrect even from a client perspective.
Hello!
I know #22 has been closed due to lack of interest/help, but the IrcCodec has is mostly valid as is for servers and has been of great help to reuse as a building block for me (toy project: https://github.com/martinetd/matrirc - don't look it's horrible :D)
So far it's mostly working, the only error I get is that irssi inquires about channel modes with
MODE #chan
without any modifier, and I get anInvalidMessage { string: "MODE #test\r\n", cause: InvalidModeString { string: "", cause: MissingModeModifier } }
Right now I don't care about this so just ignore errors but ideally would like to warn about them so handling "known errors" would make sense to me.As a more valid use-case for this crate though, if irssi uses it, it probably means it's valid and a client could want to query about channel modes for some reason, so we should allow building a MODE commande with an empty modes parameter:
Would you consider allowing that for the next breaking version? I'm not in a hurry :P
(Happy to send a PR for what would basically be the following (untested), but figured I'd rather ask first:
)