diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-07-27 01:04:24 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-07-27 01:09:35 +0200 |
commit | 44e89aafb69fb266bdf780d12a31947bfff4e330 (patch) | |
tree | 23178e429ea7269ae306172869c3492d8ed446c3 | |
parent | 746932587a11255e098c3b528afc6fcb4fc00902 (diff) |
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()
-rw-r--r-- | src/modules/m_namesx.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_uhnames.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
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<std::string> ¶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<std::string> ¶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"))) { |