summaryrefslogtreecommitdiff
path: root/src/modules/m_cap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_cap.cpp')
-rw-r--r--src/modules/m_cap.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 968c304ab..9e074b219 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -75,13 +75,13 @@ class CommandCAP : public Command
if (Data.ack.size() > 0)
{
std::string AckResult = irc::stringjoiner(Data.ack).GetJoined();
- user->WriteServ("CAP %s ACK :%s", user->nick.c_str(), AckResult.c_str());
+ user->WriteCommand("CAP", "ACK :" + AckResult);
}
if (Data.wanted.size() > 0)
{
std::string NakResult = irc::stringjoiner(Data.wanted).GetJoined();
- user->WriteServ("CAP %s NAK :%s", user->nick.c_str(), NakResult.c_str());
+ user->WriteCommand("CAP", "NAK :" + NakResult);
}
}
else if (subcommand == "END")
@@ -96,7 +96,7 @@ class CommandCAP : public Command
Data.Send();
std::string Result = irc::stringjoiner(Data.wanted).GetJoined();
- user->WriteServ("CAP %s %s :%s", user->nick.c_str(), subcommand.c_str(), Result.c_str());
+ user->WriteCommand("CAP", subcommand + " :" + Result);
}
else if (subcommand == "CLEAR")
{
@@ -106,7 +106,7 @@ class CommandCAP : public Command
Data.Send();
std::string Result = irc::stringjoiner(Data.ack).GetJoined();
- user->WriteServ("CAP %s ACK :%s", user->nick.c_str(), Result.c_str());
+ user->WriteCommand("CAP", "ACK :" + Result);
}
else
{