From 264ed0db99c460473a701ea7e426a7f22c732859 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 21 Mar 2008 21:01:56 +0000 Subject: 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 --- src/modules/m_sasl.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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 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; } -- cgit v1.2.3