Removed /duck command
This commit is contained in:
@@ -502,17 +502,6 @@ static struct cmd_t command_defs[] =
|
||||
"Example : /tiny http://www.profanity.im",
|
||||
NULL } } },
|
||||
|
||||
{ "/duck",
|
||||
cmd_duck, parse_args_with_freetext, 1, 1, NULL,
|
||||
{ "/duck query", "Perform search using DuckDuckGo chatbot.",
|
||||
{ "/duck query",
|
||||
"-----------",
|
||||
"Send a search query to the DuckDuckGo chatbot.",
|
||||
"Your chat service must be federated, i.e. allow message to be sent/received outside of its domain.",
|
||||
"",
|
||||
"Example : /duck dennis ritchie",
|
||||
NULL } } },
|
||||
|
||||
{ "/who",
|
||||
cmd_who, parse_args, 0, 2, NULL,
|
||||
{ "/who [status] [group]", "Show contacts/room participants with chosen status.",
|
||||
@@ -1693,15 +1682,6 @@ cmd_execute_default(const char * inp)
|
||||
cons_show("Unknown command: %s", inp);
|
||||
break;
|
||||
|
||||
case WIN_DUCK:
|
||||
if (status != JABBER_CONNECTED) {
|
||||
ui_current_print_line("You are not currently connected.");
|
||||
} else {
|
||||
message_send_duck(inp);
|
||||
ui_duck(inp);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ cmd_help(gchar **args, struct cmd_help_t help)
|
||||
_cmd_show_filtered_help("Basic commands", filter, ARRAY_SIZE(filter));
|
||||
|
||||
} else if (strcmp(args[0], "chatting") == 0) {
|
||||
gchar *filter[] = { "/chlog", "/otr", "/duck", "/gone", "/history",
|
||||
gchar *filter[] = { "/chlog", "/otr", "/gone", "/history",
|
||||
"/info", "/intype", "/msg", "/notify", "/outtype", "/status",
|
||||
"/close", "/clear", "/tiny" };
|
||||
_cmd_show_filtered_help("Chat commands", filter, ARRAY_SIZE(filter));
|
||||
@@ -616,7 +616,7 @@ cmd_help(gchar **args, struct cmd_help_t help)
|
||||
_cmd_show_filtered_help("Settings commands", filter, ARRAY_SIZE(filter));
|
||||
|
||||
} else if (strcmp(args[0], "other") == 0) {
|
||||
gchar *filter[] = { "/duck", "/vercheck" };
|
||||
gchar *filter[] = { "/vercheck" };
|
||||
_cmd_show_filtered_help("Other commands", filter, ARRAY_SIZE(filter));
|
||||
|
||||
} else if (strcmp(args[0], "navigation") == 0) {
|
||||
@@ -1404,40 +1404,6 @@ cmd_roster(gchar **args, struct cmd_help_t help)
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_duck(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
char *query = args[0];
|
||||
|
||||
jabber_conn_status_t conn_status = jabber_get_connection_status();
|
||||
|
||||
if (conn_status != JABBER_CONNECTED) {
|
||||
cons_show("You are not currently connected.");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// if no duck win open, create it and send a help command
|
||||
if (!ui_duck_exists()) {
|
||||
ui_create_duck_win();
|
||||
|
||||
if (query != NULL) {
|
||||
message_send_duck(query);
|
||||
ui_duck(query);
|
||||
}
|
||||
|
||||
// window exists, send query
|
||||
} else {
|
||||
ui_open_duck_win();
|
||||
|
||||
if (query != NULL) {
|
||||
message_send_duck(query);
|
||||
ui_duck(query);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_status(gchar **args, struct cmd_help_t help)
|
||||
{
|
||||
|
||||
@@ -79,7 +79,6 @@ gboolean cmd_decline(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_disco(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_disconnect(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_dnd(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_duck(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_flash(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_gone(gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_grlog(gchar **args, struct cmd_help_t help);
|
||||
|
||||
Reference in New Issue
Block a user