X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ftreesocket2.cpp;h=f2ea0808f7f9a821955732c58b428844aa77d853;hb=e950f568d0f571e9475aa38177486468714de4d3;hp=8b8aafd9e655cf7db93cfb6931ce3920de989094;hpb=98f3924960d849691abc81e0928dc43ad9233b01;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 8b8aafd9e..f2ea0808f 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -80,7 +80,7 @@ void TreeSocket::ProcessLine(std::string &line) std::string command; parameterlist params; - ServerInstance->Logs->Log("m_spanningtree", LOG_RAWIO, "S[%d] I %s", this->GetFd(), line.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_RAWIO, "S[%d] I %s", this->GetFd(), line.c_str()); Split(line, prefix, command, params); @@ -172,7 +172,7 @@ void TreeSocket::ProcessLine(std::string &line) linkID = capab->name; - MyRoot = new TreeServer(Utils, capab->name, capab->description, capab->sid, Utils->TreeRoot, this, capab->hidden); + MyRoot = new TreeServer(capab->name, capab->description, capab->sid, Utils->TreeRoot, this, capab->hidden); Utils->TreeRoot->AddChild(MyRoot); MyRoot->bursting = true; @@ -267,7 +267,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, } else { - ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Command '%s' from unknown prefix '%s'! Dropping entire command.", + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Command '%s' from unknown prefix '%s'! Dropping entire command.", command.c_str(), prefix.c_str()); return; } @@ -298,18 +298,12 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if ((!route_back_again) || (route_back_again->GetSocket() != this)) { if (route_back_again) - ServerInstance->Logs->Log("m_spanningtree", LOG_DEBUG, "Protocol violation: Fake direction '%s' from connection '%s'", + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Protocol violation: Fake direction '%s' from connection '%s'", prefix.c_str(),linkID.c_str()); return; } - /* - * First up, check for any malformed commands (e.g. MODE without a timestamp) - * and rewrite commands where necessary (SVSMODE -> MODE for services). -- w - */ - if (command == "SVSMODE") // This isn't in an "else if" so we still force FMODE for changes on channels. - command = "MODE"; - + // Translate commands coming from servers using an older protocol if (proto_version < ProtocolVersion) { if (!PreProcessOldProtocolMessage(who, command, params)) @@ -473,7 +467,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if (!cmd) { irc::stringjoiner pmlist(params); - ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Unrecognised S2S command :%s %s %s", + ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Unrecognised S2S command :%s %s %s", who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Unrecognised command '" + command + "' -- possibly loaded mismatched modules"); return; @@ -482,7 +476,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if (params.size() < cmd->min_params) { irc::stringjoiner pmlist(params); - ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Insufficient parameters for S2S command :%s %s %s", + ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Insufficient parameters for S2S command :%s %s %s", who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Insufficient parameters for command '" + command + "'"); return; @@ -501,7 +495,7 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if (res == CMD_INVALID) { irc::stringjoiner pmlist(params); - ServerInstance->Logs->Log("m_spanningtree", LOG_SPARSE, "Error handling S2S command :%s %s %s", + ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Error handling S2S command :%s %s %s", who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); SendError("Error handling '" + command + "' -- possibly loaded mismatched modules"); }