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

Allow tilde in nicks #438

Merged
merged 1 commit into from
Jan 28, 2016
Merged

Allow tilde in nicks #438

merged 1 commit into from
Jan 28, 2016

Conversation

hexjelly
Copy link
Contributor

@hexjelly hexjelly commented Jan 5, 2016

Ran into an issue with the message handler returning the "from" variable (nick) as undefined. Noticed the regex does not allow the tilde characters in nicks.

@del6597
Copy link

del6597 commented Jan 5, 2016

As far as I know and what RFC 2812 specifies, tilde () is not a valid character for a nickname.
Is this possibly an issue with prefixchars (
&@%+) on nicknames in a channel?

@hexjelly
Copy link
Contributor Author

hexjelly commented Jan 5, 2016

Maybe it's not too prevalent then, I'm not super familiar with the RFC or what server specific stuff there are. I just know on the network I'm using it's allowed; IRCNet.

@jirwin
Copy link
Collaborator

jirwin commented Jan 28, 2016

I agree with @del6597 on this one. Are you sure the ~ character isn't just the prefix of the nick?

@hexjelly Can you include the output of the error you are seeing?

@hexjelly
Copy link
Contributor Author

Yes I am certain. There is no error, you will just get undefined if you try to use the returned 'message.nick' variable anywhere, as the regex won't match. So anything that uses the parseMessage function. You can follow the RFC, but at least the module will not work properly for anyone that uses the IRCNet network, well for nicks with a tilde in them anyway :) Again, maybe it's the only network out there that doesn't follow the RFC's nick restrictions for all I know though. Though unlikely?

Still, would it not be saner to just have a more open regex to match anything followed by !@ as the source, and let the server decide what it can/will use instead?

@del6597
Copy link

del6597 commented Jan 28, 2016

I just took a look at IRCNets software changelogs.

This is version 2.11.1 of the IRC software.
===============================================================================

New features in 2.11.1:
    * Clients can use '~' char in nicknames.

@jirwin
Copy link
Collaborator

jirwin commented Jan 28, 2016

@del6597 Thanks for finding that.

@hexjelly You're right. It won't hurt anything to add it.

jirwin added a commit that referenced this pull request Jan 28, 2016
@jirwin jirwin merged commit 6915e87 into martynsmith:master Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants