diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-09-13 20:32:39 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-09-13 20:33:48 +0200 |
commit | 3f72ca011ca25f0c7fab559169ac77b92173ffec (patch) | |
tree | 80b839d333e15bd5a6f94858f8ed87ed449244a5 /src | |
parent | 83fc42e9ce2d28069bbe1f739cccb75533b7d161 (diff) |
m_blockamsg, m_sslinfo Don't convert the command name to irc::string in OnPreCommand()
See 44e89aafb69fb266bdf780d12a31947bfff4e330
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_blockamsg.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_sslinfo.cpp | 4 |
2 files changed, 2 insertions, 8 deletions
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. diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 22be27383..33a36d3b4 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -174,9 +174,7 @@ class ModuleSSLInfo : public Module ModResult OnPreCommand(std::string &command, std::vector<std::string> ¶meters, LocalUser *user, bool validated, const std::string &original_line) { - irc::string pcmd = command.c_str(); - - if ((pcmd == "OPER") && (validated)) + if ((command == "OPER") && (validated)) { OperIndex::iterator i = ServerInstance->Config->oper_blocks.find(parameters[0]); if (i != ServerInstance->Config->oper_blocks.end()) |