mirror of
https://github.com/anope/anope.git
synced 2026-06-12 17:24:49 +02:00
Increase {nickserv}:regdelay to 15 minutes, add {ns_group}:delay.
This commit is contained in:
@@ -128,9 +128,9 @@ module
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
|
||||
* directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
* directive is optional, but recommended. If not set, it defaults to 15 minutes.
|
||||
*/
|
||||
regdelay = 5m
|
||||
regdelay = 15m
|
||||
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
@@ -416,6 +416,12 @@ module
|
||||
{
|
||||
name = "ns_group"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of the GROUP command. This directive is
|
||||
* optional, but recommended. If not set, it defaults to 5 minutes.
|
||||
*/
|
||||
delay = 5m
|
||||
|
||||
/*
|
||||
* The maximum number of nicks allowed in a group.
|
||||
*
|
||||
|
||||
@@ -145,8 +145,9 @@ public:
|
||||
}
|
||||
|
||||
NickAlias *target, *na = NickAlias::Find(source.GetNick());
|
||||
time_t reg_delay = Config->GetModule("nickserv").Get<time_t>("regdelay");
|
||||
auto maxaliases = Config->GetModule(this->owner).Get<unsigned>("maxaliases");
|
||||
auto &modconf = Config->GetModule(this->owner);
|
||||
time_t reg_delay = modconf.Get<time_t>("delay", Config->GetModule("nickserv").Get<time_t>("regdelay", "5m"));
|
||||
auto maxaliases = modconf.Get<unsigned>("maxaliases");
|
||||
if (!(target = NickAlias::Find(nick)))
|
||||
source.Reply(NICK_X_NOT_REGISTERED, nick.c_str());
|
||||
else if (user && Anope::CurTime < user->lastnickreg + reg_delay)
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
}
|
||||
|
||||
time_t nickregdelay = Config->GetModule(this->owner).Get<time_t>("nickregdelay");
|
||||
time_t reg_delay = Config->GetModule("nickserv").Get<time_t>("regdelay");
|
||||
time_t reg_delay = Config->GetModule("nickserv").Get<time_t>("regdelay", "15m");
|
||||
if (u && !u->HasMode("OPER") && nickregdelay && Anope::CurTime - u->timestamp < nickregdelay)
|
||||
{
|
||||
auto waitperiod = (u->timestamp + nickregdelay) - Anope::CurTime;
|
||||
|
||||
Reference in New Issue
Block a user