|
@@ -152,7 +152,7 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
152
|
152
|
|
153
|
153
|
currentClient := clients.byNick[newcfnick]
|
154
|
154
|
// the client may just be changing case
|
155
|
|
- if currentClient != nil && currentClient != client {
|
|
155
|
+ if currentClient != nil && currentClient != client && session != nil {
|
156
|
156
|
// these conditions forbid reattaching to an existing session:
|
157
|
157
|
if client.Registered() || !bouncerAllowed || account == "" || account != currentClient.Account() || client.isTor != currentClient.isTor || client.HasMode(modes.TLS) != currentClient.HasMode(modes.TLS) {
|
158
|
158
|
return errNicknameInUse
|