]> 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 2b8d1306cd5f544265f4106063eb895a03db2742..f011fa44929320dc8de13a79dc32296d8367fba7 100644 (file)
@@ -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];