diff options
| author | 2021-06-12 07:59:13 +0300 | |
|---|---|---|
| committer | 2021-06-12 05:59:13 +0100 | |
| commit | 96e0f18f7faf7bf590c311cd0b63725c64fb4800 (patch) | |
| tree | 0edba3211652ac7b72834f415bcc042504cc4cad /src/modules/m_sasl.cpp | |
| parent | Use /run/inspircd as the runtime directory on Linux. (diff) | |
Code refactor and minor fix (#1879)
Diffstat (limited to 'src/modules/m_sasl.cpp')
| -rw-r--r-- | src/modules/m_sasl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 57e605d61..1f47038bf 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -194,6 +194,7 @@ class SaslAuthenticator void SendHostIP(UserCertificateAPI& sslapi) { std::vector<std::string> params; + params.reserve(3); params.push_back(user->GetRealHost()); params.push_back(user->GetIPString()); params.push_back(sslapi && sslapi->GetCertificate(user) ? "S" : "P"); @@ -251,10 +252,12 @@ class SaslAuthenticator ClientProtocol::Message authmsg("AUTHENTICATE"); authmsg.PushParamRef(msg[3]); - ClientProtocol::Event authevent(*g_protoev, authmsg); LocalUser* const localuser = IS_LOCAL(user); if (localuser) + { + ClientProtocol::Event authevent(*g_protoev, authmsg); localuser->Send(authevent); + } } else if (msg[2] == "D") { |
