Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nicknames #3

Closed
qaisjp opened this issue Jun 25, 2017 · 2 comments
Closed

nicknames #3

qaisjp opened this issue Jun 25, 2017 · 2 comments
Milestone

Comments

@qaisjp
Copy link
Owner

qaisjp commented Jun 25, 2017

nicknames must only use NICK_C chars, must not start with a '-' or a digit

limit is 30 characters, needs to handle conflicts


potential solution:

uname = sanitise(uname[:30])
if clash(uname) {
    discriminator = getdiscriminator(u)
    uname = uname[:30-len(u) - 2] + "~d" + discriminator
}
@qaisjp qaisjp added this to the Level 1 milestone Sep 25, 2017
qaisjp added a commit that referenced this issue Dec 25, 2017
- Moves the clean code out of the ircnick package and into the main
  package.
- Stores DiscordUser in the ircConnection rather than storing individual
  details here and there.
- Handle nickname length (does not handle username length though)
@qaisjp
Copy link
Owner Author

qaisjp commented Dec 25, 2017

Almost done here, I think a major refactor will be required to handle name conflicts correctly (especially at nickname size boundaries).

qaisjp added a commit that referenced this issue Jan 3, 2018
@qaisjp
Copy link
Owner Author

qaisjp commented Jan 3, 2018

No refactor necessary. discordgo's State works well and the branch here (thoj/go-ircevent#79) is a fantastic aid.

Just need to handle sanitisation of usernames (usernames are given the same amount of freedom as nicknames...), and we're done here!

qaisjp added a commit that referenced this issue Jan 7, 2018
@qaisjp qaisjp closed this as completed in 17536c1 Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant