mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-15 12:18:11 -07:00
Require that server names must be hostnames, and nicks cannot be hostnames
This commit is contained in:
@@ -47,6 +47,10 @@ func (name Name) IsNickname() bool {
|
||||
strings.Contains(namestr, "!") || strings.Contains(namestr, "@") {
|
||||
return false
|
||||
}
|
||||
// names that look like hostnames are restricted to servers, as with other ircds
|
||||
if IsHostname(namestr) {
|
||||
return false
|
||||
}
|
||||
return NicknameExpr.MatchString(namestr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user