diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-07-01 18:02:03 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2021-07-01 18:02:03 +0200 |
commit | 06482fdaefc2ae8651bcdd719936cb9c7bcfb10f (patch) | |
tree | 3b2e577ff352dadaf8827539b64e60b039a560e0 /src/command/cmd_defs.c | |
parent | 226cffe75be5d408e1d357337eb4ed921100f3b7 (diff) | |
download | profani-tty-06482fdaefc2ae8651bcdd719936cb9c7bcfb10f.tar.gz |
Add option to only allow messages from jids in roster
`/silence on` will throw away all messages (type: chat, normal) that come from jids that are not in the roster. Implement https://github.com/profanity-im/profanity/issues/955
Diffstat (limited to 'src/command/cmd_defs.c')
-rw-r--r-- | src/command/cmd_defs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 63cb8780..16efea21 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2622,6 +2622,20 @@ static struct cmd_t command_defs[] = { CMD_NOEXAMPLES }, + { "/silence", + parse_args, 1, 1, &cons_silence_setting, + CMD_NOSUBFUNCS + CMD_MAINFUNC(cmd_silence) + CMD_TAGS( + CMD_TAG_CHAT) + CMD_SYN( + "/silence on|off") + CMD_DESC( + "Let's you silence all message attempts from people who are not in your roster.") + CMD_NOARGS + CMD_NOEXAMPLES + }, + // NEXT-COMMAND (search helper) }; |