diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-21 18:44:08 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-21 18:44:08 +0100 |
commit | e244cb2c63b1ac1d85bdbb4691f7b1bd940ae804 (patch) | |
tree | 5a69b0efe6c0b7ab88925d3d066271ec40845e23 /src/modules/m_sasl.cpp | |
parent | fead8af2b767cb5591536a3c98babf6b35194a66 (diff) | |
parent | 7dd831383f7506e49f568d0684ee1ecb1f5dc90f (diff) |
Merge insp20
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r-- | src/modules/m_sasl.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 1d67f0c02..796d343ea 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -91,20 +91,23 @@ class SaslAuthenticator { case SASL_INIT: this->agent = msg[0]; - this->user->Write("AUTHENTICATE %s", msg[3].c_str()); this->state = SASL_COMM; - break; + /* fall through */ case SASL_COMM: if (msg[0] != this->agent) return this->state; - if (msg[2] != "D") + if (msg[2] == "C") this->user->Write("AUTHENTICATE %s", msg[3].c_str()); - else + else if (msg[2] == "D") { this->state = SASL_DONE; this->result = this->GetSaslResult(msg[3]); } + else if (msg[2] == "M") + this->user->WriteNumeric(908, "%s %s :are available SASL mechanisms", this->user->nick.c_str(), msg[3].c_str()); + else + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Services sent an unknown SASL message \"%s\" \"%s\"", msg[2].c_str(), msg[3].c_str()); break; case SASL_DONE: |