mirror of
https://github.com/anope/anope.git
synced 2026-07-03 09:13:12 +02:00
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.
This commit is contained in:
@@ -249,6 +249,7 @@ module
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's access list.
|
||||
* If not set, the default is 32. This number cannot be set to 0.
|
||||
*/
|
||||
accessmax = 32
|
||||
|
||||
@@ -297,7 +298,16 @@ command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
|
||||
*
|
||||
* Used for configuring your SSL certificate list, which can be used to automatically identify you.
|
||||
*/
|
||||
module { name = "ns_cert"; accessmax = 5; }
|
||||
module
|
||||
{
|
||||
name = "ns_cert"
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's certificate fingerprint list.
|
||||
* The default is 5. This number cannot be set to 0.
|
||||
*/
|
||||
accessmax = 5
|
||||
}
|
||||
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
|
||||
|
||||
/*
|
||||
|
||||
@@ -28,7 +28,7 @@ class CommandNSAccess : public Command
|
||||
return;
|
||||
}
|
||||
|
||||
if (nc->access.size() >= Config->GetModule(this->owner)->Get<unsigned>("accessmax"))
|
||||
if (nc->access.size() >= Config->GetModule(this->owner)->Get<unsigned>("accessmax", "32"))
|
||||
{
|
||||
source.Reply(_("Sorry, the maximum of %d access entries has been reached."), Config->GetModule(this->owner)->Get<unsigned>("accessmax"));
|
||||
return;
|
||||
|
||||
@@ -138,7 +138,7 @@ class CommandNSCert : public Command
|
||||
{
|
||||
NSCertList *cl = nc->Require<NSCertList>("certificates");
|
||||
|
||||
if (cl->GetCertCount() >= Config->GetModule(this->owner)->Get<unsigned>("accessmax"))
|
||||
if (cl->GetCertCount() >= Config->GetModule(this->owner)->Get<unsigned>("accessmax", "5"))
|
||||
{
|
||||
source.Reply(_("Sorry, the maximum of %d certificate entries has been reached."), Config->GetModule(this->owner)->Get<unsigned>("accessmax"));
|
||||
return;
|
||||
|
||||
@@ -181,13 +181,13 @@ class NickServCore : public Module, public NickServService
|
||||
}
|
||||
else if (na->nc->HasExt("KILL_QUICK"))
|
||||
{
|
||||
time_t killquick = Config->GetModule("nickserv")->Get<time_t>("killquick", "60s");
|
||||
time_t killquick = Config->GetModule("nickserv")->Get<time_t>("killquick", "20s");
|
||||
u->SendMessage(NickServ, _("If you do not change within %s, I will change your nick."), Anope::Duration(killquick, u->Account()).c_str());
|
||||
new NickServCollide(this, u, na, killquick);
|
||||
}
|
||||
else
|
||||
{
|
||||
time_t kill = Config->GetModule("nickserv")->Get<time_t>("kill", "20s");
|
||||
time_t kill = Config->GetModule("nickserv")->Get<time_t>("kill", "60s");
|
||||
u->SendMessage(NickServ, _("If you do not change within %s, I will change your nick."), Anope::Duration(kill, u->Account()).c_str());
|
||||
new NickServCollide(this, u, na, kill);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user