xep-0308: Make /correct work without quotation marks

Now we can specify an unlimited amount of arguments for commands.
Maybe this is also helpful for other commands that use quotation marks
so far.
This commit is contained in:
Michael Vetter
2020-02-12 14:50:58 +01:00
parent 1072cdab0a
commit 8f37afcd37
4 changed files with 14 additions and 11 deletions

View File

@@ -8701,7 +8701,10 @@ cmd_correct(ProfWin *window, const char *const command, gchar **args)
}
// send message again, with replace flag
cl_ev_send_msg_correct(chatwin, args[0], FALSE, TRUE);
gchar *message = g_strjoinv(" ", args);
cl_ev_send_msg_correct(chatwin, message, FALSE, TRUE);
free(message);
return TRUE;
} else if (window->type == WIN_MUC) {
ProfMucWin *mucwin = (ProfMucWin*)window;
@@ -8713,7 +8716,10 @@ cmd_correct(ProfWin *window, const char *const command, gchar **args)
}
// send message again, with replace flag
cl_ev_send_muc_msg_corrected(mucwin, args[0], FALSE, TRUE);
gchar *message = g_strjoinv(" ", args);
cl_ev_send_muc_msg_corrected(mucwin, message, FALSE, TRUE);
free(message);
return TRUE;
}