- GenericCapHandler(ev, "sasl", "sasl");
-
- if (ev->GetEventID() == "encap_received")
- {
- std::deque<std::string>* parameters = (std::deque<std::string>*)ev->GetData();
-
- if ((*parameters)[1] != "SASL")
- return;
-
- User* target = ServerInstance->FindNick((*parameters)[3]);
- if (!target)
- {
- ServerInstance->Logs->Log("m_sasl", DEBUG,"User not found in sasl ENCAP event: %s", (*parameters)[3].c_str());
- return;
- }
-
- SaslAuthenticator *sasl_;
- if (!target->GetExt("sasl_authenticator", sasl_))
- return;
-
- SaslState state = sasl_->ProcessInboundMessage(*parameters);
- if (state == SASL_DONE)
- {
- delete sasl_;
- target->Shrink("sasl");
- }
- }