From 90ea1b01b78a94486b8142808c06aacff543ca64 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Mon, 22 Aug 2016 16:46:44 +0200 Subject: Add stdalgo::string::equalsci and use it instead of irc::string for case-insensitive comparison --- src/modules/m_dccallow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/m_dccallow.cpp') 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."); -- cgit v1.3.1-10-gc9f91