diff options
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r-- | src/modules/m_sasl.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 278058190..1758c7771 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -59,8 +59,8 @@ class ModuleSASL : public Module ModuleSASL(InspIRCd* Me) : Module(Me) { - Implementation eventlist[] = { I_OnEvent, I_OnUserRegister }; - ServerInstance->Modules->Attach(eventlist, this, 2); + Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnPostConnect }; + ServerInstance->Modules->Attach(eventlist, this, 3); sasl = new CommandAuthenticate(ServerInstance, this); ServerInstance->AddCommand(sasl); @@ -71,14 +71,22 @@ class ModuleSASL : public Module virtual int OnUserRegister(User *user) { - std::string* str = NULL; - if (user->GetExt("sasl")) { user->WriteServ("906 %s :SASL authentication aborted", user->nick); user->Shrink("sasl"); } + return 0; + } + + virtual void OnPostConnect(User* user) + { + if (!IS_LOCAL(user)) + return; + + std::string* str = NULL; + if (user->GetExt("acountname", str)) { std::deque<std::string> params; @@ -88,7 +96,7 @@ class ModuleSASL : public Module Event e((char*)¶ms, this, "send_metadata"); e.Send(ServerInstance); } - return 0; + return; } virtual ~ModuleSASL() |