summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-08 13:36:41 +0000
committerSadie Powell <sadie@witchery.services>2025-03-08 14:07:15 +0000
commit62bfa33464df8cc413fa4f111ab62e189be0ca32 (patch)
tree5dd8b0bb0caa1fc3c76e05253641f332a3c10af4 /data
parentb4ab7dadb94c463b46e8bef5bce8c8c531bf1995 (diff)
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.
Diffstat (limited to 'data')
-rw-r--r--data/anope.example.conf4
-rw-r--r--data/nickserv.example.conf62
2 files changed, 37 insertions, 29 deletions
diff --git a/data/anope.example.conf b/data/anope.example.conf
index 4c73deaa3..ad85cd364 100644
--- a/data/anope.example.conf
+++ b/data/anope.example.conf
@@ -746,8 +746,8 @@ log
* nickserv/getemail nickserv/suspend nickserv/ajoin nickserv/list
*
* nickserv/saset/autoop nickserv/saset/display nickserv/saset/email nickserv/saset/greet
- * nickserv/saset/kill nickserv/saset/keepmodes nickserv/saset/language nickserv/saset/message
- * nickserv/saset/neverop nickserv/saset/noexpire nickserv/saset/password nickserv/saset/private
+ * nickserv/saset/keepmodes nickserv/saset/language nickserv/saset/message nickserv/saset/neverop
+ * nickserv/saset/noexpire nickserv/saset/password nickserv/saset/private nickserv/saset/protect
* nickserv/saset/url
*
* hostserv/set hostserv/del hostserv/list
diff --git a/data/nickserv.example.conf b/data/nickserv.example.conf
index 6c0ca4cda..d4e5c28fe 100644
--- a/data/nickserv.example.conf
+++ b/data/nickserv.example.conf
@@ -126,7 +126,7 @@ module
* This directive is optional, if left blank, the options will default to memo_signon, and
* memo_receive. If you really want no defaults, use "none" by itself as the option.
*/
- defaults = "killprotect ns_private hide_email hide_mask memo_signon memo_receive autoop"
+ defaults = "autoop hide_email hide_mask memo_receive memo_signon ns_private protect"
/*
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
@@ -171,11 +171,25 @@ module
hidenetsplitquit = no
/*
- * If set, is the length of time NickServ's killquick and kill options wait before
- * forcing users off of protected nicknames.
+ * The default period to force users to stop using a protected nickname after.
+ *
+ * Defaults to 1 minute.
+ */
+ defaultprotect = 1m
+
+ /*
+ * The minimum period that a user can have a user forced off their protected nickname after.
+ *
+ * Defaults to 10 seconds.
+ */
+ minprotect = 10s
+
+ /*
+ * The maximum period that a user can have a user forced off their protected nickname after.
+ *
+ * Defaults to 10 minutes.
*/
- killquick = 20s
- kill = 60s
+ maxprotect = 10m
/*
* If set, forbids the registration of nicks that contain an existing
@@ -597,28 +611,6 @@ command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
/*
- * ns_set_kill
- *
- * Provides the commands nickserv/set/kill and kickserv/saset/kill.
- *
- * Used for configuring nickname protection.
- */
-module
-{
- name = "ns_set_kill"
-
- /*
- * Allow the use of the IMMED option in the NickServ SET KILL command.
- *
- * This directive is optional.
- */
- #allowkillimmed = yes
-}
-
-command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
-command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
-
-/*
* ns_set_language
*
* Provides the command nickserv/set/language and nickserv/saset/language.
@@ -663,6 +655,22 @@ command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/mi
#command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/misc"; misc_description = _("Associate a time zone with this account"); permission = "nickserv/saset/timezone"; group = "nickserv/admin"; }
/*
+ * ns_set_protect
+ *
+ * Provides the commands nickserv/set/protect and kickserv/saset/protect.
+ *
+ * Used for configuring nickname protection.
+ */
+module { name = "ns_set_protect" }
+
+command { service = "NickServ"; name = "SET PROTECT"; command = "nickserv/set/protect"; }
+command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/saset/protect"; permission = "nickserv/saset/kill"; }
+
+# For compatibility with Anope 2.0.
+command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = true; }
+command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = true; }
+
+/*
* ns_suspend
*
* Provides the commands nickserv/suspend and nickserv/unsuspend.