From 3f72ca011ca25f0c7fab559169ac77b92173ffec Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 13 Sep 2012 20:32:39 +0200 Subject: m_blockamsg, m_sslinfo Don't convert the command name to irc::string in OnPreCommand() See 44e89aafb69fb266bdf780d12a31947bfff4e330 --- src/modules/m_blockamsg.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/modules/m_blockamsg.cpp') diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 8160fcf54..c570e0a71 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -102,11 +102,7 @@ class ModuleBlockAmsg : public Module if (user->registered != REG_ALL) return MOD_RES_PASSTHRU; - // We want case insensitive command comparison. - // Add std::string contructor for irc::string :x - irc::string cmd = command.c_str(); - - if(validated && (cmd == "PRIVMSG" || cmd == "NOTICE") && (parameters.size() >= 2)) + if ((validated) && (parameters.size() >= 2) && ((command == "PRIVMSG") || (command == "NOTICE"))) { // parameters[0] should have the target(s) in it. // I think it will be faster to first check if there are any commas, and if there are then try and parse it out. -- cgit v1.2.3