1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 20:16:36 +02:00

Rework how nickname protection works.

- Rename the command and module from kill to protect (this command
  hasn't actually killed users in a long time).
- Replace QUICK/IMMED with a duration option.
This commit is contained in:
Sadie Powell
2025-03-08 13:36:41 +00:00
parent b4ab7dadb9
commit 62bfa33464
11 changed files with 337 additions and 336 deletions
+23 -1
View File
@@ -146,7 +146,29 @@ Serializable *NickCore::Unserialize(Serializable *obj, Serialize::Data &data)
b = false;
data["extensible:KILLPROTECT"] >> b;
if (b)
nc->Extend<bool>("KILLPROTECT");
nc->Extend<bool>("PROTECT");
b = false;
data["KILLPROTECT"] >> b;
if (b)
{
nc->Extend<bool>("PROTECT");
nc->Extend("PROTECT_AFTER", Config->GetModule("nickserv").Get<time_t>("kill", "60s"));
}
b = false;
data["KILL_QUICK"] >> b;
if (b)
{
nc->Extend<bool>("PROTECT");
nc->Extend("PROTECT_AFTER", Config->GetModule("nickserv").Get<time_t>("killquick", "20s"));
}
b = false;
data["KILL_IMMED"] >> b;
if (b)
{
nc->Extend<bool>("PROTECT");
nc->Extend("PROTECT_AFTER", 0);
}
/* end compat */
return nc;