Simplify max nicklen checks for hostmask parsing #523
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes checking isupport NICKLEN for
isHostmaskNicknameOn
(used for sender/prefix parsing) in all cases.Reasons:
** https://tools.ietf.org/html/draft-hardy-irc-isupport-00#section-4.14 "A client elsewhere on the network MAY use a nick length of higher value"
** https://tools.ietf.org/html/draft-brocklesby-irc-isupport-03#section-3.13 " This parameter does not restrict the length of any nicknames other clients on the network may use"
** https://defs.ircdocs.horse/defs/isupport.html#nicklen "Other clients on the network may have nicknames longer than this."
The most serious issue here is for servers with ISUPPORT but no NICKLEN key, with nicks longer than 9 chars, where parsing just silently breaks and stuff like server-initiated JOINs fail to register.
This now always uses a limit of 50, which is arbitrary but probably a safe enough sanity check.