From 55d96bd075818e6da81e91ebd82cd938ec0908b2 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 7 Mar 2010 15:52:49 +0000 Subject: Change "CAP *" reply to "CAP $nick", which is the intended use of the parameter git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12611 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cap.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index a0730efa7..acfddaaf2 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -73,13 +73,13 @@ class CommandCAP : public Command if (Data.ack.size() > 0) { std::string AckResult = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined(); - user->WriteServ("CAP * ACK :%s", AckResult.c_str()); + user->WriteServ("CAP %s ACK :%s", user->nick.c_str(), AckResult.c_str()); } if (Data.wanted.size() > 0) { std::string NakResult = irc::stringjoiner(" ", Data.wanted, 0, Data.wanted.size() - 1).GetJoined(); - user->WriteServ("CAP * NAK :%s", NakResult.c_str()); + user->WriteServ("CAP %s NAK :%s", user->nick.c_str(), NakResult.c_str()); } } else if (subcommand == "END") @@ -103,7 +103,7 @@ class CommandCAP : public Command else Result = ""; - user->WriteServ("CAP * %s :%s", subcommand.c_str(), Result.c_str()); + user->WriteServ("CAP %s %s :%s", user->nick.c_str(), subcommand.c_str(), Result.c_str()); } else if (subcommand == "CLEAR") { @@ -117,11 +117,11 @@ class CommandCAP : public Command Data.Send(); std::string Result = irc::stringjoiner(" ", Data.ack, 0, Data.ack.size() - 1).GetJoined(); - user->WriteServ("CAP * ACK :%s", Result.c_str()); + user->WriteServ("CAP %s ACK :%s", user->nick.c_str(), Result.c_str()); } else { - user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, "* %s :Invalid CAP subcommand", subcommand.c_str()); + user->WriteNumeric(ERR_INVALIDCAPSUBCOMMAND, "%s %s :Invalid CAP subcommand", user->nick.c_str(), subcommand.c_str()); } return CMD_FAILURE; -- cgit v1.2.3