diff options
| author | 2016-08-22 16:46:44 +0200 | |
|---|---|---|
| committer | 2016-08-22 16:46:44 +0200 | |
| commit | 90ea1b01b78a94486b8142808c06aacff543ca64 (patch) | |
| tree | 50d3582ff28f56a3816307cc6e10fc4f775d2e2a /src/modules/m_dccallow.cpp | |
| parent | m_services_account Detect nickname case changes by using FindNickOnly() (diff) | |
| download | inspircd++-90ea1b01b78a94486b8142808c06aacff543ca64.tar.gz inspircd++-90ea1b01b78a94486b8142808c06aacff543ca64.tar.bz2 inspircd++-90ea1b01b78a94486b8142808c06aacff543ca64.zip | |
Add stdalgo::string::equalsci and use it instead of irc::string for case-insensitive comparison
Diffstat (limited to 'src/modules/m_dccallow.cpp')
| -rw-r--r-- | src/modules/m_dccallow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index d8fbef69a..edf9d012f 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -328,12 +328,12 @@ class ModuleDCCAllow : public Module if (s == std::string::npos) return MOD_RES_PASSTHRU; - irc::string type = assign(buf.substr(0, s)); + const std::string type = buf.substr(0, s); ConfigTag* conftag = ServerInstance->Config->ConfValue("dccallow"); bool blockchat = conftag->getBool("blockchat"); - if (type == "SEND") + if (stdalgo::string::equalsci(type, "SEND")) { size_t first; @@ -386,7 +386,7 @@ class ModuleDCCAllow : public Module u->WriteNotice("If you trust " + user->nick + " and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system."); return MOD_RES_DENY; } - else if ((type == "CHAT") && (blockchat)) + else if ((blockchat) && (stdalgo::string::equalsci(type, "CHAT"))) { user->WriteNotice("The user " + u->nick + " is not accepting DCC CHAT requests from you."); u->WriteNotice(user->nick + " (" + user->ident + "@" + user->dhost + ") attempted to initiate a DCC CHAT session, which was blocked."); |
