about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/command')
-rw-r--r--src/command/command.c20
-rw-r--r--src/command/commands.c38
-rw-r--r--src/command/commands.h1
3 files changed, 2 insertions, 57 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 7e868938..c5f76f83 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -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;
     }
diff --git a/src/command/commands.c b/src/command/commands.c
index 32d36f58..9cc2214d 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -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) {
@@ -1405,40 +1405,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)
 {
     char *usr = args[0];
diff --git a/src/command/commands.h b/src/command/commands.h
index 4494017c..757a09cc 100644
--- a/src/command/commands.h
+++ b/src/command/commands.h
@@ -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);