mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 10:10:08 -08:00
strings: Disallow more broken nicknames
This commit is contained in:
parent
78c9c285b4
commit
5a8e7709b2
1 changed files with 2 additions and 2 deletions
|
|
@ -52,13 +52,13 @@ func (name Name) IsNickname() bool {
|
|||
// ! separates username from nickname
|
||||
// @ separates nick+user from hostname
|
||||
// # is a channel prefix
|
||||
// @+ are channel membership prefixes
|
||||
// ~&@%+ are channel membership prefixes
|
||||
// - is typically disallowed from first char of nicknames
|
||||
// nicknames can't start with digits
|
||||
if strings.Contains(namestr, "*") || strings.Contains(namestr, "?") ||
|
||||
strings.Contains(namestr, ".") || strings.Contains(namestr, ",") ||
|
||||
strings.Contains(namestr, "!") || strings.Contains(namestr, "@") ||
|
||||
strings.Contains("#@+-1234567890", string(namestr[0])) {
|
||||
strings.Contains("#~&@%+-1234567890", string(namestr[0])) {
|
||||
return false
|
||||
}
|
||||
// names that look like hostnames are restricted to servers, as with other ircds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue