diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 21:01:56 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 21:01:56 +0000 |
commit | 264ed0db99c460473a701ea7e426a7f22c732859 (patch) | |
tree | 0d6532d4a6a7e0074e7924878f7e6a65e674535d /src/modules/m_sasl.cpp | |
parent | e81ba398aba81406df97220cb3619f26ec0f8714 (diff) |
When a user registers and SASL has given them accountname metadata push this metadata out on registration.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9159 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r-- | src/modules/m_sasl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 0e07f276f..278058190 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -71,11 +71,23 @@ 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"); } + + if (user->GetExt("acountname", str)) + { + std::deque<std::string> params; + params.push_back(user->uuid); + params.push_back("accountname"); + params.push_back(*str); + Event e((char*)¶ms, this, "send_metadata"); + e.Send(ServerInstance); + } return 0; } |