From 710d4848bd7c42fbd203d976aadd7044fdc6d8c7 Mon Sep 17 00:00:00 2001 From: Robby- Date: Mon, 28 Oct 2013 09:25:17 +0100 Subject: Fix kill and killquick default expiry times. ns_access and ns_cert: Fix accessmax defaults, also state in the config that 0 is not a valid value. --- modules/commands/ns_access.cpp | 2 +- modules/commands/ns_cert.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/commands') diff --git a/modules/commands/ns_access.cpp b/modules/commands/ns_access.cpp index ddbcad0a2..15bddeb36 100644 --- a/modules/commands/ns_access.cpp +++ b/modules/commands/ns_access.cpp @@ -28,7 +28,7 @@ class CommandNSAccess : public Command return; } - if (nc->access.size() >= Config->GetModule(this->owner)->Get("accessmax")) + if (nc->access.size() >= Config->GetModule(this->owner)->Get("accessmax", "32")) { source.Reply(_("Sorry, the maximum of %d access entries has been reached."), Config->GetModule(this->owner)->Get("accessmax")); return; diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp index 6b3aa2a14..09754a90d 100644 --- a/modules/commands/ns_cert.cpp +++ b/modules/commands/ns_cert.cpp @@ -138,7 +138,7 @@ class CommandNSCert : public Command { NSCertList *cl = nc->Require("certificates"); - if (cl->GetCertCount() >= Config->GetModule(this->owner)->Get("accessmax")) + if (cl->GetCertCount() >= Config->GetModule(this->owner)->Get("accessmax", "5")) { source.Reply(_("Sorry, the maximum of %d certificate entries has been reached."), Config->GetModule(this->owner)->Get("accessmax")); return; -- cgit