From 44e89aafb69fb266bdf780d12a31947bfff4e330 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Fri, 27 Jul 2012 01:04:24 +0200 Subject: m_namesx, m_uhnames Don't convert the command name to irc::string in OnPreCommand() The command is converted into an uppercase string in CommandParser::ProcessCommand() --- src/modules/m_namesx.cpp | 3 +-- src/modules/m_uhnames.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 7e9c5fd48..535f6ec10 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -52,13 +52,12 @@ class ModuleNamesX : public Module ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) { - irc::string c = command.c_str(); /* We don't actually create a proper command handler class for PROTOCTL, * because other modules might want to have PROTOCTL hooks too. * Therefore, we just hook its as an unvalidated command therefore we * can capture it even if it doesnt exist! :-) */ - if (c == "PROTOCTL") + if (command == "PROTOCTL") { if ((parameters.size()) && (!strcasecmp(parameters[0].c_str(),"NAMESX"))) { diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 37bd67440..5693eb807 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -51,13 +51,12 @@ class ModuleUHNames : public Module ModResult OnPreCommand(std::string &command, std::vector ¶meters, LocalUser *user, bool validated, const std::string &original_line) { - irc::string c = command.c_str(); /* We don't actually create a proper command handler class for PROTOCTL, * because other modules might want to have PROTOCTL hooks too. * Therefore, we just hook its as an unvalidated command therefore we * can capture it even if it doesnt exist! :-) */ - if (c == "PROTOCTL") + if (command == "PROTOCTL") { if ((parameters.size()) && (!strcasecmp(parameters[0].c_str(),"UHNAMES"))) { -- cgit v1.2.3