summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 20:54:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 20:54:46 +0000
commit8793de777349918629d954b2f6bf6419d158dcc2 (patch)
tree8fb8f35d282493927a378b6ab5cb7bb7e9000a96
parent5c8964c3557eae90a172e029b6e30d73157ef1c7 (diff)
Add 906, sasl aborted
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9157 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_sasl.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 049af329b..48da83aad 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 };
- ServerInstance->Modules->Attach(eventlist, this, 1);
+ Implementation eventlist[] = { I_OnEvent, I_OnUserRegister };
+ ServerInstance->Modules->Attach(eventlist, this, 2);
sasl = new CommandAuthenticate(ServerInstance, this);
ServerInstance->AddCommand(sasl);
@@ -69,6 +69,14 @@ class ModuleSASL : public Module
ServerInstance->Logs->Log("m_sasl", DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
}
+ virtual int OnUserRegister(User *user)
+ {
+ if (user->GetExt("sasl"))
+ {
+ user->WriteServ("906 %s :SASL authentication aborted", user->nick);
+ user->Shrink("sasl");
+ }
+ }
virtual ~ModuleSASL()
{