summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 21:03:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 21:03:39 +0000
commitd94c99d4ffad183e6a064d68568dda46b9293b44 (patch)
tree1b47be05eb0e75aaf56f7dd8406bac82e5bdb9bb /src/modules/m_sasl.cpp
parent264ed0db99c460473a701ea7e426a7f22c732859 (diff)
That stuff belongs in OnPostconnect or it will be sent too early
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9160 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r--src/modules/m_sasl.cpp18
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*)&params, this, "send_metadata");
e.Send(ServerInstance);
}
- return 0;
+ return;
}
virtual ~ModuleSASL()