From cf89e10a4c5d968ca46ca462cf643cfe8c246be0 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 3 Aug 2014 18:22:03 -0400 Subject: Add ms_ignore:max config option --- modules/commands/ms_ignore.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/commands/ms_ignore.cpp') diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp index 4483f9684..5db7117bf 100644 --- a/modules/commands/ms_ignore.cpp +++ b/modules/commands/ms_ignore.cpp @@ -50,6 +50,12 @@ class CommandMSIgnore : public Command source.Reply(ACCESS_DENIED); else if (command.equals_ci("ADD") && !param.empty()) { + if (mi->ignores.size() >= Config->GetModule(this->owner)->Get("max", "32")) + { + source.Reply(_("Sorry, the memo ignore list for \002%s\002 is full."), channel.c_str()); + return; + } + if (std::find(mi->ignores.begin(), mi->ignores.end(), param.ci_str()) == mi->ignores.end()) { mi->ignores.push_back(param.ci_str()); -- cgit