forked from External/ergo
accounts: Check for account logins correctly, fixes registration. Also fix a typo, thanks squigz!
This commit is contained in:
parent
90435256fd
commit
cd8b4877b6
4 changed files with 9 additions and 4 deletions
|
|
@ -248,7 +248,7 @@ func (client *Client) LoginToAccount(account *ClientAccount) {
|
|||
if client.account == account {
|
||||
// already logged into this acct, no changing necessary
|
||||
return
|
||||
} else if client.account != nil {
|
||||
} else if client.LoggedIntoAccount() {
|
||||
// logout of existing acct
|
||||
var newClientAccounts []*Client
|
||||
for _, c := range account.Clients {
|
||||
|
|
@ -294,7 +294,7 @@ func (client *Client) LogoutOfAccount() {
|
|||
// authExternalHandler parses the SASL EXTERNAL mechanism.
|
||||
func authExternalHandler(server *Server, client *Client, mechanism string, value []byte) bool {
|
||||
if client.certfp == "" {
|
||||
client.Send(nil, server.name, ERR_SASLFAIL, client.nick, "SASL authentication failed, you are not connecting with a caertificate")
|
||||
client.Send(nil, server.name, ERR_SASLFAIL, client.nick, "SASL authentication failed, you are not connecting with a certificate")
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue