Added /c-test sendline

This commit is contained in:
James Booth
2016-02-17 01:27:41 +00:00
parent c31d63b2d4
commit 5e59aec89a

View File

@@ -43,6 +43,17 @@ cmd_ctest(char **args)
} else {
prof_cons_show("Invalid usage, see '/help c-test' for details.");
}
} else if (strcmp(args[0], "sendline") == 0) {
if (args[1]) {
prof_win_focus(plugin_win);
prof_send_line(args[1]);
char *str = "called -> prof_send_line: ";
char buf[strlen(str) + strlen(args[1])];
sprintf(buf, "%s%s", str, args[1]);
prof_win_show(plugin_win, buf);
} else {
prof_cons_show("Invalid usage, see '/help c-test' for details.");
}
} else if (strcmp(args[0], "notify") == 0) {
if (args[1]) {
prof_win_focus(plugin_win);
@@ -64,7 +75,7 @@ prof_init(const char * const version, const char * const status)
{
prof_win_create(plugin_win, handle_win_input);
prof_register_command("/c-test", 1, 2, "/c-test", "C Test plugin", "C Test plugin", cmd_ctest);
char *arg_ac[] = { "consalert", "consshow", "notify", NULL };
char *arg_ac[] = { "consalert", "consshow", "notify", "sendline", NULL };
prof_register_ac("/c-test", arg_ac);
}