mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-15 00:19:29 +01:00
commit
d14ff9b3d5
@ -195,15 +195,6 @@ func (clients *ClientManager) SetNick(client *Client, session *Session, newNick
|
|||||||
dryRun || session == nil {
|
dryRun || session == nil {
|
||||||
return "", errNicknameInUse, false
|
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)
|
reattachSuccessful, numSessions, lastSeen, wasAway, nowAway := currentClient.AddSession(session)
|
||||||
if !reattachSuccessful {
|
if !reattachSuccessful {
|
||||||
return "", errNicknameInUse, false
|
return "", errNicknameInUse, false
|
||||||
|
@ -359,10 +359,7 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||||||
rb := NewResponseBuffer(session)
|
rb := NewResponseBuffer(session)
|
||||||
nickError := performNickChange(server, c, c, session, c.preregNick, rb)
|
nickError := performNickChange(server, c, c, session, c.preregNick, rb)
|
||||||
rb.Send(true)
|
rb.Send(true)
|
||||||
if nickError == errInsecureReattach {
|
if nickError != nil {
|
||||||
c.Quit(c.t("You can't mix secure and insecure connections to this account"), nil)
|
|
||||||
return true
|
|
||||||
} else if nickError != nil {
|
|
||||||
c.preregNick = ""
|
c.preregNick = ""
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
2
irctest
2
irctest
@ -1 +1 @@
|
|||||||
Subproject commit e5f22e8080d215fa9b24b51752fbb8f5d51fbbc9
|
Subproject commit 321e254d15fab53fe6c8e3959312f6c0805c770f
|
Loading…
Reference in New Issue
Block a user