summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-02-12 16:35:02 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-02-12 16:35:02 +0100
commitae6967b8b30ebc956e3158127ecba5d01dc09204 (patch)
treeb0940ea9cbd75acfdaa655b3a9975f67e3f8ae48 /src/modules/m_sasl.cpp
parenta7aa76f17ac22897e08558f0f78d891d3d4f7de6 (diff)
parent7918febc630d7d6f94fda1a918fe7b98c2d0e742 (diff)
Merge branch 'master+crossmodevents'
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r--src/modules/m_sasl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 0a2c840bd..c96b87034 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -28,12 +28,13 @@ enum SaslState { SASL_INIT, SASL_COMM, SASL_DONE };
enum SaslResult { SASL_OK, SASL_FAIL, SASL_ABORT };
static std::string sasl_target = "*";
+static Events::ModuleEventProvider* saslevprov;
static void SendSASL(const parameterlist& params)
{
if (!ServerInstance->PI->SendEncapsulatedData(sasl_target, "SASL", params))
{
- SASLFallback(NULL, params);
+ FOREACH_MOD_CUSTOM(*saslevprov, SASLEventListener, OnSASLAuth, (params));
}
}
@@ -246,6 +247,7 @@ class ModuleSASL : public Module
GenericCap cap;
CommandAuthenticate auth;
CommandSASL sasl;
+ Events::ModuleEventProvider sasleventprov;
public:
ModuleSASL()
@@ -253,7 +255,9 @@ class ModuleSASL : public Module
, cap(this, "sasl")
, auth(this, authExt, cap)
, sasl(this, authExt)
+ , sasleventprov(this, "event/sasl")
{
+ saslevprov = &sasleventprov;
}
void init() CXX11_OVERRIDE
@@ -283,11 +287,6 @@ class ModuleSASL : public Module
{
return Version("Provides support for IRC Authentication Layer (aka: atheme SASL) via AUTHENTICATE.",VF_VENDOR);
}
-
- void OnEvent(Event &ev) CXX11_OVERRIDE
- {
- cap.HandleEvent(ev);
- }
};
MODULE_INIT(ModuleSASL)