Merge pull request #2073 from slingamn/issue2013.1

fix #2013
This commit is contained in:
Shivaram Lingamneni
2023-06-08 07:06:44 -07:00
committed by GitHub
3 changed files with 2 additions and 14 deletions
-9
View File
@@ -195,15 +195,6 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
dryRun || session == nil {
return "", errNicknameInUse, false
}
// check TLS modes
if client.HasMode(modes.TLS) != currentClient.HasMode(modes.TLS) {
if useAccountName {
// #955: this is fatal because they can't fix it by trying a different nick
return "", errInsecureReattach, false
} else {
return "", errNicknameInUse, false
}
}
reattachSuccessful, numSessions, lastSeen, wasAway, nowAway := currentClient.AddSession(session)
if !reattachSuccessful {
return "", errNicknameInUse, false
+1 -4
View File
@@ -359,10 +359,7 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
rb := NewResponseBuffer(session)
nickError := performNickChange(server, c, c, session, c.preregNick, rb)
rb.Send(true)
if nickError == errInsecureReattach {
c.Quit(c.t("You can't mix secure and insecure connections to this account"), nil)
return true
} else if nickError != nil {
if nickError != nil {
c.preregNick = ""
return false
}
+1 -1
Submodule irctest updated: e5f22e8080...321e254d15