about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/command/command.c b/src/command/command.c
index fb2ef9c5..5535c022 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1772,9 +1772,10 @@ cmd_process_input(char *inp)
 void
 cmd_execute_connect(const char * const account)
 {
-    char inp[INP_WIN_MAX];
-    snprintf(inp, sizeof(inp), "%s %s", "/connect", account);
-    cmd_process_input(inp);
+    GString *command = g_string_new("/connect ");
+    g_string_append(command, account);
+    cmd_process_input(command->str);
+    g_string_free(command, TRUE);
 }
 
 static gboolean