mirror of
https://github.com/anope/anope.git
synced 2026-06-28 10:06:37 +02:00
Allow configuring killquick and kill delays
This commit is contained in:
@@ -256,6 +256,13 @@ nickserv
|
||||
* The maximum number of channels a user can have on NickServ's AJOIN command.
|
||||
*/
|
||||
ajoinmax = 10
|
||||
|
||||
/*
|
||||
* If set, is the length of time NickServ's killquick and kill options wait before
|
||||
* forcing users off of protected nicknames.
|
||||
*/
|
||||
killquick = 20s
|
||||
kill = 60s
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -548,6 +548,9 @@ class CoreExport ServerConfig
|
||||
bool NSAddAccessOnReg;
|
||||
/* Maximum number of channels on AJoin */
|
||||
unsigned AJoinMax;
|
||||
/* Kill & killquick delays before force changing off users */
|
||||
time_t NSKillQuick;
|
||||
time_t NSKill;
|
||||
|
||||
/* Core ChanServ modules */
|
||||
Anope::string ChanCoreModules;
|
||||
|
||||
@@ -124,13 +124,13 @@ class MyNickServService : public NickServService
|
||||
}
|
||||
else if (na->nc->HasFlag(NI_KILL_QUICK))
|
||||
{
|
||||
u->SendMessage(NickServ, _("If you do not change within 20 seconds, I will change your nick."));
|
||||
new NickServCollide(u, 20);
|
||||
u->SendMessage(NickServ, _("If you do not change within %s, I will change your nick."), duration(Config->NSKillQuick, u->Account()).c_str());
|
||||
new NickServCollide(u, Config->NSKillQuick);
|
||||
}
|
||||
else
|
||||
{
|
||||
u->SendMessage(NickServ, _("If you do not change within one minute, I will change your nick."));
|
||||
new NickServCollide(u, 60);
|
||||
u->SendMessage(NickServ, _("If you do not change within %s, I will change your nick."), duration(Config->NSKill, u->Account()).c_str());
|
||||
new NickServCollide(u, Config->NSKill);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1212,6 +1212,8 @@ ConfigItems::ConfigItems(ServerConfig *conf)
|
||||
{"nickserv", "modeonid", "no", new ValueContainerBool(&conf->NSModeOnID), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "addaccessonreg", "no", new ValueContainerBool(&conf->NSAddAccessOnReg), DT_BOOLEAN, NoValidation},
|
||||
{"nickserv", "ajoinmax", "10", new ValueContainerUInt(&conf->AJoinMax), DT_UINTEGER, NoValidation},
|
||||
{"nickserv", "killquick", "20", new ValueContainerTime(&conf->NSKillQuick), DT_TIME, NoValidation},
|
||||
{"nickserv", "kill", "60", new ValueContainerTime(&conf->NSKill), DT_TIME, NoValidation},
|
||||
{"mail", "usemail", "no", new ValueContainerBool(&conf->UseMail), DT_BOOLEAN, ValidateEmailReg},
|
||||
{"mail", "sendmailpath", "", new ValueContainerString(&conf->SendMailPath), DT_STRING, ValidateMail},
|
||||
{"mail", "sendfrom", "", new ValueContainerString(&conf->SendFrom), DT_STRING, ValidateMail},
|
||||
|
||||
Reference in New Issue
Block a user