summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2014-01-11 23:42:34 +0200
committerMantas Mikulėnas <grawity@gmail.com>2014-01-11 23:53:24 +0200
commit1c89cb1002c915a18abd1dda2204b5c3ea1b5515 (patch)
tree147d651f844ce0be07d5d083110afc6d59265e3c /src
parentfd57589b17c7eb5d29346651dd354b790454c68e (diff)
Support SASL messages other than 'C' and 'D'
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_sasl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 64960448e..66efcfe4e 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -99,13 +99,17 @@ class SaslAuthenticator
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("m_sasl", DEFAULT, "Services sent an unknown SASL message \"%s\" \"%s\"", msg[2].c_str(), msg[3].c_str());
break;
case SASL_DONE: