main
main copied to clipboard
Fix incorrect handling of undefined newPayload.pass in upgradeLegacyJoin
I noticed that when enabling the captcha, using the official client to join (without using a password) adds an tripcode: LPFQmL.
Similarly, hack.chat++ also has this issue, but FoxHC does not. I compared the differences in the data packets they send upon joining and found that FoxHC declares the password using the passwd/password field.
This made me think that perhaps the tripcode LPFQmL is generated because this field is empty.
To test this, I ran the command !trip undefined and found that the result was indeed LPFQmL.
Finally, I discovered that upgradeLegacyJoin would not modify newPayload.pass when it was undefined and no password was specified via nickname. This caused the returned payload's pass field to remain undefined, leading to incorrect tripcode generation.