1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Add cs_mode:max config option

This commit is contained in:
Adam
2014-08-03 18:57:00 -04:00
parent 063d9bf5f6
commit d6d72cd803
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -1061,6 +1061,13 @@ module
* If not set, the default is +nt.
*/
mlock = "+nt"
/*
* The maximum number of entries that may be on a mode lock list.
*
* This directive is optional.
*/
max = 32
}
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management"; }
+2
View File
@@ -327,6 +327,8 @@ class CommandCSMode : public Command
source.Reply(_("Missing parameter for mode %c."), cm->mchar);
else if (cm->type == MODE_LIST && ci->c && IRCD->GetMaxListFor(ci->c) && ci->c->HasMode(cm->name) >= IRCD->GetMaxListFor(ci->c))
source.Reply(_("List for mode %c is full."), cm->mchar);
else if (modelocks->GetMLock().size() >= Config->GetModule(this->owner)->Get<unsigned>("max", "32"))
source.Reply(_("The mode lock list of \002%s\002 is full."), ci->name.c_str());
else
{
modelocks->SetMLock(cm, adding, mode_param, source.GetNick());