summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 19:58:49 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-21 19:58:49 +0000
commit34bb0fb31f0ab94bcd4bc72c47f591e2b27e8b10 (patch)
treea614e729494445a6319a28c4f27e5bf010d89168 /src/modules
parentdde67b9765bc485d807f181bba108c00f4c44dba (diff)
This seems to play nice now, but it seems we may have to redo it all AGAIN :(
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9150 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_sasl.cpp16
-rw-r--r--src/modules/m_spanningtree/main.cpp2
2 files changed, 15 insertions, 3 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 87d87d978..91443ab4b 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -19,21 +19,30 @@
class CommandAuthenticate : public Command
{
+ Module* Creator;
public:
- CommandAuthenticate (InspIRCd* Instance) : Command(Instance,"AUTHENTICATE", 0, 1)
+ CommandAuthenticate (InspIRCd* Instance, Module* creator) : Command(Instance,"AUTHENTICATE", 0, 1, true), Creator(creator)
{
this->source = "m_sasl.so";
}
CmdResult Handle (const char* const* parameters, int pcnt, User *user)
{
+ ServerInstance->Logs->Log("m_sasl", DEBUG,"AUTHENTICATE");
if (user->registered != REG_ALL)
{
+ ServerInstance->Logs->Log("m_sasl", DEBUG,"Sending ENCAP for AUTHENTICATE");
/* Only allow AUTHENTICATE on unregistered clients */
std::deque<std::string> params;
params.push_back("*");
+ params.push_back("AUTHENTICATE");
+ params.push_back(user->uuid);
+
for (int i = 0; i < pcnt; ++i)
- params.push_back(parameters[0]);
+ params.push_back(parameters[i]);
+
+ Event e((char*)&params, Creator, "send_encap");
+ e.Send(ServerInstance);
}
return CMD_FAILURE;
}
@@ -52,7 +61,8 @@ class ModuleSASL : public Module
Implementation eventlist[] = { I_OnEvent };
ServerInstance->Modules->Attach(eventlist, this, 1);
- sasl = new CommandAuthenticate(ServerInstance);
+ sasl = new CommandAuthenticate(ServerInstance, this);
+ ServerInstance->AddCommand(sasl);
}
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 27179ad49..e084944cd 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -889,6 +889,8 @@ void ModuleSpanningTree::OnEvent(Event* event)
if (params->size() < 2)
return;
+ ServerInstance->Logs->Log("m_spanningtree", DEBUG, "ENCAP sending from spanningtree...");
+
Utils->DoOneToMany(ServerInstance->Config->GetSID(), "ENCAP", *params);
}
else if (event->GetEventID() == "send_metadata")