registration: remove auth param and excess functions

This commit is contained in:
swirl
2021-08-17 14:09:32 -04:00
parent f53b4353fd
commit 87d2c95c87
9 changed files with 5 additions and 210 deletions

View File

@@ -2649,7 +2649,7 @@ static struct cmd_t command_defs[] = {
CMD_TAGS(
CMD_TAG_CONNECTION)
CMD_SYN(
"/register <username> <server> [port <port>] [tls force|allow|trust|legacy|disable] [auth default|legacy]")
"/register <username> <server> [port <port>] [tls force|allow|trust|legacy|disable]")
CMD_DESC(
"Register an account on a server.")
CMD_ARGS(
@@ -2660,9 +2660,7 @@ static struct cmd_t command_defs[] = {
{ "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." },
{ "auth default", "Default authentication process." },
{ "auth legacy", "Allow legacy authentication." })
{ "tls disable", "Disable TLS for the connection." })
CMD_EXAMPLES(
"/register odin valhalla.edda ",
"/register freyr vanaheimr.edda port 5678",

View File

@@ -9579,14 +9579,6 @@ cmd_register(ProfWin* window, const char* const command, gchar** args)
}
}
char* auth_policy = g_hash_table_lookup(options, "auth");
if (auth_policy && (g_strcmp0(auth_policy, "default") != 0) && (g_strcmp0(auth_policy, "legacy") != 0)) {
cons_bad_cmd_usage(command);
cons_show("");
options_destroy(options);
return TRUE;
}
char* username = args[0];
char* server = args[1];
@@ -9595,7 +9587,7 @@ cmd_register(ProfWin* window, const char* const command, gchar** args)
if (g_strcmp0(passwd, confirm_passwd) == 0) {
log_info("Attempting to register account %s on server %s.", username, server);
connection_register(server, port, tls_policy, auth_policy, username, passwd);
connection_register(server, port, tls_policy, username, passwd);
} else {
cons_show("The two passwords do not match.");
}