aboutsummaryrefslogtreecommitdiffstats
path: root/src/command
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-22 15:33:54 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-10-22 15:33:54 +0200
commit6a88af6bc68de3ca742b9d5c32714e4e93dc59f6 (patch)
tree521b450be5d2db81ff09f077ebbec209c289ee72 /src/command
parent47d8d210abae320b5d43d9135997dcafee50cb97 (diff)
downloadprofani-tty-6a88af6bc68de3ca742b9d5c32714e4e93dc59f6.tar.gz
Remove /leave command
We have `/close` which does the same and more. Regards https://github.com/profanity-im/profanity/issues/1116
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_defs.c14
-rw-r--r--src/command/cmd_funcs.c13
2 files changed, 0 insertions, 27 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 32bbec46..a29576bd 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -579,20 +579,6 @@ static struct cmd_t command_defs[] =
"/join mychannel")
},
- { "/leave",
- parse_args, 0, 0, NULL,
- CMD_NOSUBFUNCS
- CMD_MAINFUNC(cmd_leave)
- CMD_TAGS(
- CMD_TAG_GROUPCHAT)
- CMD_SYN(
- "/leave")
- CMD_DESC(
- "Leave the current chat or room.")
- CMD_NOARGS
- CMD_NOEXAMPLES
- },
-
{ "/invite",
parse_args_with_freetext, 1, 2, NULL,
CMD_NOSUBFUNCS
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 9b2622e7..b0f578d6 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -5088,19 +5088,6 @@ cmd_clear(ProfWin *window, const char *const command, gchar **args)
}
gboolean
-cmd_leave(ProfWin *window, const char *const command, gchar **args)
-{
- if (window->type != WIN_MUC && window->type != WIN_CHAT && window->type != WIN_PRIVATE) {
- cons_show("The /leave command is only valid in chat, or chat room windows.");
- cons_alert();
- return TRUE;
- }
-
- // use /close behaviour
- return cmd_close(window, "/leave", args);
-}
-
-gboolean
cmd_privileges(ProfWin *window, const char *const command, gchar **args)
{
_cmd_set_boolean_preference(args[0], command, "MUC privileges", PREF_MUC_PRIVILEGES);