diff options
| author | 2016-02-22 12:52:18 +0100 | |
|---|---|---|
| committer | 2016-02-22 12:52:18 +0100 | |
| commit | 0b63ccd0b5cb26883d6becb196fb98e4f95d0397 (patch) | |
| tree | d9c660b46e106d76c5953579eca45e49c4486cbf /src/modules/m_dccallow.cpp | |
| parent | Merge pull request #1139 from johanna-a/master (diff) | |
| parent | Release v2.0.21 (diff) | |
| download | inspircd++-0b63ccd0b5cb26883d6becb196fb98e4f95d0397.tar.gz inspircd++-0b63ccd0b5cb26883d6becb196fb98e4f95d0397.tar.bz2 inspircd++-0b63ccd0b5cb26883d6becb196fb98e4f95d0397.zip | |
Merge insp20
Diffstat (limited to 'src/modules/m_dccallow.cpp')
| -rw-r--r-- | src/modules/m_dccallow.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 93fddf813..0e57896f3 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -58,6 +58,7 @@ class CommandDccallow : public Command DCCAllowExt& ext; public: + unsigned int maxentries; CommandDccallow(Module* parent, DCCAllowExt& Ext) : Command(parent, "DCCALLOW", 0) , ext(Ext) @@ -142,6 +143,12 @@ class CommandDccallow : public Command ul.push_back(user); } + if (dl->size() >= maxentries) + { + user->WriteNumeric(996, "%s :Too many nicks on DCCALLOW list", user->nick.c_str()); + return CMD_FAILURE; + } + for (dccallowlist::const_iterator k = dl->begin(); k != dl->end(); ++k) { if (k->nickname == target->nick) @@ -453,6 +460,9 @@ class ModuleDCCAllow : public Module void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE { + ConfigTag* tag = ServerInstance->Config->ConfValue("dccallow"); + cmd.maxentries = tag->getInt("maxentries", 20); + bfl.clear(); ConfigTagList tags = ServerInstance->Config->ConfTags("banfile"); for (ConfigIter i = tags.first; i != tags.second; ++i) |
