summaryrefslogtreecommitdiff
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_dccallow.cpp')
-rw-r--r--src/modules/m_dccallow.cpp6
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.");