3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-02-16 21:50:39 +01:00

Merge pull request #633 from slingamn/issue632

fix #632
This commit is contained in:
Shivaram Lingamneni 2019-09-24 23:21:16 -07:00 committed by GitHub
commit 7ef55c654a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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