summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-06 23:00:18 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-06 23:00:18 +0100
commit13edc2e8eb1404e51131468451ed64ef4d25cdaf (patch)
tree10141b160bd22f34dc12e9917876b6053c4c6ec2 /src/modules
parenta8b986bd785eeef1d3415da8e8bf7e599dad0377 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cap.cpp3
1 files changed, 2 insertions, 1 deletions
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<std::string> &parameters, 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")
{