aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_cap.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2014-02-05 13:49:16 +0000
committerGravatar Attila Molnar2014-02-06 23:10:01 +0100
commitdb0e78c5d2e0998591b274c027fef26e1ac6ce6a (patch)
treef87b58008e0b3ccb44c4c4088e913de95cf1dcb3 /src/modules/m_cap.cpp
parentm_cap Instead of using case insensitive compare convert the subcommand to upp... (diff)
downloadinspircd++-db0e78c5d2e0998591b274c027fef26e1ac6ce6a.tar.gz
inspircd++-db0e78c5d2e0998591b274c027fef26e1ac6ce6a.tar.bz2
inspircd++-db0e78c5d2e0998591b274c027fef26e1ac6ce6a.zip
Fix various cases of UUID exposure.
- Introduce WriteCommand which sends * when the user has not registered. - Switch a ton of code to use WriteCommand instead of WriteServ. - Convert WriteNotice to be a wrapper around WriteCommand. - Only send * when NICK has not been sent instead of before registration.
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
{