summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")