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.
IPv6 idents are now the first ten characters of the base32 encoded SHA-1 hash of the user's IP. Unlike IPv4 addresses, there is a possibility that there will be collisions (i.e., two IPs that get the same ident). This is unfourtunate, but it is unavoidable given that IRCds typically only allow about ten characters for the username. Fourtunately, the probability of collision is quite small (assuming SHA-1 produces well distributed output, the probability of even an 8-character ident collising is one in 32^8 or about one in a trillion).
This also fixes addresses starting with a colon (e.g., IPv4-mapped IPv6 addresses), unmaps IPv4-mapped IPv6 addresses, and fixes a spot where it was assumed that addresses with a dot were IPv4.
Note: I chose ten characters because a typical IRCd (Charybdis) limits the username to ten characters (or 9 characters if a tilde is added due to identd not being used).