diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-10-13 21:19:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 21:19:22 +0200 |
commit | e0e45b7b24aad0932c2778ba5f93a87778cb9c24 (patch) | |
tree | db71f24a3498f76b8fd2fab37e2d07636cdffd23 /src/command/cmd_defs.c | |
parent | f21595597f4fa872b77d7f76ae04916f4aae732e (diff) | |
parent | 0653200965122c46be4f31996d2396b568ee8dcf (diff) | |
download | profani-tty-e0e45b7b24aad0932c2778ba5f93a87778cb9c24.tar.gz |
Merge pull request #1574 from binex-dsk/master
Add in-band account registration Fix https://github.com/profanity-im/profanity/issues/199
Diffstat (limited to 'src/command/cmd_defs.c')
-rw-r--r-- | src/command/cmd_defs.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index 1b8c3112..9ac9c1dd 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2636,6 +2636,32 @@ static struct cmd_t command_defs[] = { CMD_NOEXAMPLES }, + { "/register", + parse_args, 2, 6, NULL, + CMD_NOSUBFUNCS + CMD_MAINFUNC(cmd_register) + CMD_TAGS( + CMD_TAG_CONNECTION) + CMD_SYN( + "/register <username> <server> [port <port>] [tls force|allow|trust|legacy|disable]") + CMD_DESC( + "Register an account on a server.") + CMD_ARGS( + { "<username>", "Username to register with." }, + { "<server>", "Server to register account on." }, + { "port <port>", "The port to use if different to the default (5222, or 5223 for SSL)." }, + { "tls force", "Force TLS connection, and fail if one cannot be established. This is the default behavior." }, + { "tls allow", "Use TLS for the connection if it is available." }, + { "tls trust", "Force TLS connection and trust the server's certificate." }, + { "tls legacy", "Use legacy TLS for the connection. This forces TLS just after the TCP connection is established. Use when a server doesn't support STARTTLS." }, + { "tls disable", "Disable TLS for the connection." }) + CMD_EXAMPLES( + "/register odin valhalla.edda ", + "/register freyr vanaheimr.edda port 5678", + "/register me 127.0.0.1 tls disable", + "/register someuser my.xmppserv.er port 5443 tls force") + }, + // NEXT-COMMAND (search helper) }; @@ -3006,3 +3032,4 @@ command_mangen(void) g_free(header); g_list_free(cmds); } + |