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

Fix username regex in cake plugin #287

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Fix username regex in cake plugin #287

wants to merge 2 commits into from

Conversation

prplz
Copy link
Contributor

@prplz prplz commented May 31, 2014

On network I frequent, the ` character is common in nicknames and they deserve cake too!
Found the regex at http://stackoverflow.com/questions/5163255/regular-expression-to-match-irc-nickname .
The reason it has two groups of characters is that nicknames can't start with numbers.

@Zarthus
Copy link
Contributor

Zarthus commented May 31, 2014

I suggest this instead:

[a-z\d_\-\[\]^\\{}|`]{1,32}

http://regex101.com/r/bD3eS9

@prplz
Copy link
Contributor Author

prplz commented May 31, 2014

Lets just go with checking for spaces, it doesn't really matter if it's a valid IRC nick. This is copied from how attacks.py validates.

@literalplus
Copy link
Contributor

And why do we need to block spaces again?

-- Above message was sent from my mobile phone. There may and will be all
kinds of errors included. For free!
On 31 May 2014 13:25, "prplz" [email protected] wrote:

Lets just go with checking for spaces, it doesn't really matter if it's a
valid IRC nick. This is copied from how attacks.py validates.


Reply to this email directly or view it on GitHub
#287 (comment).

@prplz
Copy link
Contributor Author

prplz commented May 31, 2014

Its not about that, its about it blocking valid irc nicks for example with the ` character

@literalplus
Copy link
Contributor

I know what this PR is about, was just asking a general question.

-- Above message was sent from my mobile phone. There may and will be all
kinds of errors included. For free!
On 31 May 2014 15:19, "prplz" [email protected] wrote:

Its not about that, its about it blocking valid irc nicks for example with
the ` character


Reply to this email directly or view it on GitHub
#287 (comment).

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

Successfully merging this pull request may close these issues.

3 participants