From 9dd4108273d95204edbc366618da6500571267df Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 5 Feb 2014 16:44:22 +0000 Subject: Convert irc::stringjoiner to be a method instead of a class. Add separator parameter --- src/modules/m_spanningtree/capab.cpp | 3 +-- src/modules/m_spanningtree/treesocket2.cpp | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 07d11ad83..c52dffa41 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -70,8 +70,7 @@ static std::string BuildModeList(ModeType type) } } sort(modes.begin(), modes.end()); - irc::stringjoiner line(modes); - return line.GetJoined(); + return irc::stringjoiner(modes); } void TreeSocket::SendCapabilities(int phase) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index f97ce5539..4639a237e 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -313,9 +313,8 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, return; } - irc::stringjoiner pmlist(params); ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Unrecognised S2S command :%s %s %s", - who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); + who->uuid.c_str(), command.c_str(), irc::stringjoiner(params).c_str()); SendError("Unrecognised command '" + command + "' -- possibly loaded mismatched modules"); return; } @@ -324,9 +323,8 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if (params.size() < cmdbase->min_params) { - irc::stringjoiner pmlist(params); 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()); + who->uuid.c_str(), command.c_str(), irc::stringjoiner(params).c_str()); SendError("Insufficient parameters for command '" + command + "'"); return; } @@ -347,9 +345,8 @@ void TreeSocket::ProcessConnectedLine(std::string& prefix, std::string& command, if (res == CMD_INVALID) { - irc::stringjoiner pmlist(params); ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Error handling S2S command :%s %s %s", - who->uuid.c_str(), command.c_str(), pmlist.GetJoined().c_str()); + who->uuid.c_str(), command.c_str(), irc::stringjoiner(params).c_str()); SendError("Error handling '" + command + "' -- possibly loaded mismatched modules"); } else if (res == CMD_SUCCESS) -- cgit v1.2.3