diff options
-rw-r--r-- | data/nickserv.example.conf | 7 | ||||
-rw-r--r-- | include/config.h | 3 | ||||
-rw-r--r-- | modules/pseudoclients/nickserv.cpp | 8 | ||||
-rw-r--r-- | src/config.cpp | 2 |
4 files changed, 16 insertions, 4 deletions
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf index 599656ce5..5db22cfdc 100644 --- a/data/nickserv.example.conf +++ b/data/nickserv.example.conf @@ -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 } /* diff --git a/include/config.h b/include/config.h index e37028bcf..775f03aa8 100644 --- a/include/config.h +++ b/include/config.h @@ -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; diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 34b945f08..6307434de 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -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); } } diff --git a/src/config.cpp b/src/config.cpp index a5e07596d..91cf8a805 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -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}, |