3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 13:29:27 +01:00

clean up redundant check for sasl mechanism

This commit is contained in:
Shivaram Lingamneni 2021-07-30 14:03:40 -04:00
parent e1401934df
commit 41822813c0

View File

@ -220,19 +220,8 @@ func authenticateHandler(server *Server, client *Client, msg ircmsg.Message, rb
}
// call actual handler
handler, handlerExists := EnabledSaslMechanisms[session.sasl.mechanism]
// like 100% not required, but it's good to be safe I guess
if !handlerExists {
rb.Add(nil, server.name, ERR_SASLFAIL, details.nick, client.t("SASL authentication failed"))
session.sasl.Clear()
return false
}
// let the SASL handler do its thing
exiting := handler(server, client, session, data, rb)
return exiting
handler := EnabledSaslMechanisms[session.sasl.mechanism]
return handler(server, client, session, data, rb)
}
// AUTHENTICATE PLAIN