]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dccallow.cpp
Fix some oversights
[user/henk/code/inspircd.git] / src / modules / m_dccallow.cpp
index 7627ba8c7d66d32c21e619531eea4ce259bb379b..f011fa44929320dc8de13a79dc32296d8367fba7 100644 (file)
@@ -257,7 +257,7 @@ class ModuleDCCAllow : public Module
 
  public:
        ModuleDCCAllow()
-               : ext("dccallow", this)
+               : ext("dccallow", ExtensionItem::EXT_USER, this)
                , cmd(this, ext)
        {
        }
@@ -318,6 +318,9 @@ class ModuleDCCAllow : public Module
                                        while (ss >> buf)
                                                tokens.push_back(buf);
 
+                                       if (tokens.size() < 2)
+                                               return MOD_RES_PASSTHRU;
+
                                        irc::string type = tokens[1].c_str();
 
                                        ConfigTag* conftag = ServerInstance->Config->ConfValue("dccallow");
@@ -325,6 +328,9 @@ class ModuleDCCAllow : public Module
 
                                        if (type == "SEND")
                                        {
+                                               if (tokens.size() < 3)
+                                                       return MOD_RES_PASSTHRU;
+
                                                std::string defaultaction = conftag->getString("action");
                                                std::string filename = tokens[2];