]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dccallow.cpp
Pass the ModeHandler to User::HasModePermission()
[user/henk/code/inspircd.git] / src / modules / m_dccallow.cpp
index d8fbef69afa4d3d6666e0d244f7167c4d4a19b7d..edf9d012f72277171a5803713d0341c5dd666279 100644 (file)
@@ -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.");