From 13edc2e8eb1404e51131468451ed64ef4d25cdaf Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Thu, 6 Feb 2014 23:00:18 +0100 Subject: m_cap Instead of using case insensitive compare convert the subcommand to uppercase This way if we send back the subcommand it will be in uppercase even if the client sent it in lowercase --- src/modules/m_cap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_cap.cpp') diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index 605423ae0..968c304ab 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -49,7 +49,8 @@ class CommandCAP : public Command CmdResult Handle (const std::vector ¶meters, User *user) { - irc::string subcommand = parameters[0].c_str(); + std::string subcommand(parameters[0].length(), ' '); + std::transform(parameters[0].begin(), parameters[0].end(), subcommand.begin(), ::toupper); if (subcommand == "REQ") { -- cgit v1.3.1-10-gc9f91