forked from External/ergo
Merge remote-tracking branch 'origin/master' into websockets_draft.2
This commit is contained in:
commit
25813f6d3a
20 changed files with 268 additions and 77 deletions
|
|
@ -438,11 +438,14 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||
}
|
||||
|
||||
rb := NewResponseBuffer(session)
|
||||
nickAssigned := performNickChange(server, c, c, session, c.preregNick, rb)
|
||||
nickError := performNickChange(server, c, c, session, c.preregNick, rb)
|
||||
rb.Send(true)
|
||||
if !nickAssigned {
|
||||
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 {
|
||||
c.preregNick = ""
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
if session.client != c {
|
||||
|
|
@ -450,7 +453,7 @@ func (server *Server) tryRegister(c *Client, session *Session) (exiting bool) {
|
|||
// we'll play the reg burst later, on the new goroutine associated with
|
||||
// (thisSession, otherClient). This is to avoid having to transfer state
|
||||
// like nickname, hostname, etc. to show the correct values in the reg burst.
|
||||
return
|
||||
return false
|
||||
}
|
||||
|
||||
// check KLINEs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue