]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_namesx, m_uhnames Don't convert the command name to irc::string in OnPreCommand()
authorattilamolnar <attilamolnar@hush.com>
Thu, 26 Jul 2012 23:04:24 +0000 (01:04 +0200)
committerattilamolnar <attilamolnar@hush.com>
Thu, 26 Jul 2012 23:09:35 +0000 (01:09 +0200)
The command is converted into an uppercase string in CommandParser::ProcessCommand()

src/modules/m_namesx.cpp
src/modules/m_uhnames.cpp

index 7e9c5fd48f6e6dbaaf586d74559308dbe91c4d75..535f6ec103e598e77feb44a7a053fde194a744eb 100644 (file)
@@ -52,13 +52,12 @@ class ModuleNamesX : public Module
 
        ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, 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")))
                        {
index 37bd674408bf6072c46c14de7b63a6441e815689..5693eb8070b8006a9907f55bfbf4af0cf256e808 100644 (file)
@@ -51,13 +51,12 @@ class ModuleUHNames : public Module
 
        ModResult OnPreCommand(std::string &command, std::vector<std::string> &parameters, 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")))
                        {