about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
authorswirl <roachh@protonmail.com>2021-08-17 14:09:32 -0400
committerswirl <roachh@protonmail.com>2021-08-17 14:09:48 -0400
commit87d2c95c870d697822c7d25f4c734e259a893d85 (patch)
tree2c95c17bfc9936eafee06de36f7094439617d836 /src/command
parentf53b4353fdba469297ee97ff4947f830bfd79f53 (diff)
downloadprofani-tty-87d2c95c870d697822c7d25f4c734e259a893d85.tar.gz
registration: remove auth param and excess functions
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_defs.c6
-rw-r--r--src/command/cmd_funcs.c10
2 files changed, 3 insertions, 13 deletions
diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c
index 80d98827..09523bd7 100644
--- a/src/command/cmd_defs.c
+++ b/src/command/cmd_defs.c
@@ -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",
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index b7c6afad..8b4dc3fa 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -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.");
     }