summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--ReleaseNotes.adoc16
-rw-r--r--src/plugins/trigger/trigger-config.c4
-rw-r--r--tests/unit/plugins/trigger/test-trigger-config.cpp6
4 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 5cba92248..47fb44adf 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -26,6 +26,7 @@ New features::
* api: add user variables in evaluation of expressions with "define:name,value"
* api: add IRC message parameters "param1" to "paramN" and "num_params" in output of irc_message_parse
* irc: allow quotes around IRC message in command /server fakerecv
+ * trigger: hide key and password in command "/msg nickserv setpass nick key password"
* trigger: add support of option "-server" when hiding passwords in command /msg nickserv register
Bug fixes::
diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc
index 0978d9e5f..fbf0a50a3 100644
--- a/ReleaseNotes.adoc
+++ b/ReleaseNotes.adoc
@@ -20,17 +20,17 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v3.4]]
== Version 3.4 (under dev)
-[[v3.4_trigger_cmd_pass_register]]
-=== Default trigger "cmd_pass_register"
+[[v3.4_default_triggers]]
+=== Default triggers
-The trigger "cmd_pass_register" has been updated to support option
-`-server <name>` in commands `/msg` and `/quote`.
+The existing triggers "cmd_pass" and "cmd_pass_register" have been updated to
+hide key and password in command `/msg nickserv setpass <nick> <key> <password>`
+and support the option `-server <name>`.
-You can restore the default trigger "cmd_pass_register" with the following
-command:
+You can restore the default triggers with the following command:
----
-/trigger restore cmd_pass_register
+/trigger restore cmd_pass cmd_pass_register
----
[[v3.4_hdata_search]]
@@ -996,7 +996,7 @@ Or set explicitly the value:
The existing triggers "cmd_pass" and "msg_auth" have been updated to hide
password in command `/msg nickserv set password` and support the option
-`-server xxx`.
+`-server <name>`.
You can restore the default triggers with the following command:
diff --git a/src/plugins/trigger/trigger-config.c b/src/plugins/trigger/trigger-config.c
index ddc9b9843..2e0fd5e63 100644
--- a/src/plugins/trigger/trigger-config.c
+++ b/src/plugins/trigger/trigger-config.c
@@ -77,6 +77,7 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
* - /msg [-server <name>] nickserv release <nick> <password>
* - /msg [-server <name>] nickserv regain <nick> <password>
* - /msg [-server <name>] nickserv recover <nick> <password>
+ * - /msg [-server <name>] nickserv setpass <nick> <key> <password>
* - /oper <nick> <password>
* - /quote pass <password>
* - /secure passphrase <passphrase>
@@ -95,7 +96,8 @@ char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS] =
"ghost +[^ ]+|"
"release +[^ ]+|"
"regain +[^ ]+|"
- "recover +[^ ]+"
+ "recover +[^ ]+|"
+ "setpass +[^ ]+"
") +)|"
"/oper +[^ ]+ +|"
"/quote +pass +|"
diff --git a/tests/unit/plugins/trigger/test-trigger-config.cpp b/tests/unit/plugins/trigger/test-trigger-config.cpp
index 56300c488..b664e3933 100644
--- a/tests/unit/plugins/trigger/test-trigger-config.cpp
+++ b/tests/unit/plugins/trigger/test-trigger-config.cpp
@@ -170,6 +170,12 @@ TEST(TriggerConfig, DefaultTriggerCmdPass)
WEE_CHECK_MODIFIER_INPUT("/msg nickserv recover alice ******",
"/msg nickserv recover alice secret");
+ /* /msg nickserv setpass <nick> <key> <password> */
+ WEE_CHECK_MODIFIER_INPUT("/msg nickserv setpass alice",
+ "/msg nickserv setpass alice");
+ WEE_CHECK_MODIFIER_INPUT("/msg nickserv setpass alice **********",
+ "/msg nickserv setpass alice key secret");
+
/* /oper <nick> <password> */
WEE_CHECK_MODIFIER_INPUT("/oper alice",
"/oper alice");