mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 02:56:20 +00:00
registration: remove auth param and excess functions
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user