|
@@ -101,8 +101,10 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
101
|
101
|
// on previous versions of Ergo:
|
102
|
102
|
if newNick != accountName {
|
103
|
103
|
// can't contain "disfavored" characters like <, or start with a $ because
|
104
|
|
- // it collides with the massmessage mask syntax:
|
105
|
|
- if strings.ContainsAny(newNick, disfavoredNameCharacters) || strings.HasPrefix(newNick, "$") {
|
|
104
|
+ // it collides with the massmessage mask syntax. '0' conflicts with the use of 0
|
|
105
|
+ // as a placeholder in WHOX (#1896):
|
|
106
|
+ if strings.ContainsAny(newNick, disfavoredNameCharacters) || strings.HasPrefix(newNick, "$") ||
|
|
107
|
+ newNick == "0" {
|
106
|
108
|
return "", errNicknameInvalid, false
|
107
|
109
|
}
|
108
|
110
|
}
|