CloudBotLegacy
CloudBotLegacy copied to clipboard
Fix username regex in cake plugin
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.
I suggest this instead:
[a-z\d_\-\[\]^\\{}|`]{1,32}
http://regex101.com/r/bD3eS9
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.
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 https://github.com/ClouDev/CloudBot/pull/287#issuecomment-44745746.
Its not about that, its about it blocking valid irc nicks for example with the ` character
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 https://github.com/ClouDev/CloudBot/pull/287#issuecomment-44748140.