about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-07-10 17:48:34 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-10 17:48:34 +0200
commit39315483a8e59deaba9a92e20fab0a2a7835873f (patch)
tree3b62918f8999023da1b63f5b9e2baadc9a791851 /src/command/cmd_funcs.c
parentb6361ddeabcc0596d194b36e312a93cfca9df394 (diff)
downloadprofani-tty-39315483a8e59deaba9a92e20fab0a2a7835873f.tar.gz
Remove `/tiny` command
boothj5 gave his okay too.

Fix https://github.com/profanity-im/profanity/issues/1370
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index ffc448db..96be6802 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -69,7 +69,6 @@
 #include "tools/http_upload.h"
 #include "tools/autocomplete.h"
 #include "tools/parser.h"
-#include "tools/tinyurl.h"
 #include "tools/bookmark_ignore.h"
 #include "plugins/plugins.h"
 #include "ui/ui.h"
@@ -5033,58 +5032,6 @@ cmd_alias(ProfWin* window, const char* const command, gchar** args)
 }
 
 gboolean
-cmd_tiny(ProfWin* window, const char* const command, gchar** args)
-{
-    char* url = args[0];
-
-    if (window->type != WIN_CHAT && window->type != WIN_MUC && window->type != WIN_PRIVATE) {
-        cons_show("/tiny can only be used in chat windows");
-        return TRUE;
-    }
-
-    if (!tinyurl_valid(url)) {
-        win_println(window, THEME_ERROR, "-", "/tiny, badly formed URL: %s", url);
-        return TRUE;
-    }
-
-    char* tiny = tinyurl_get(url);
-    if (!tiny) {
-        win_println(window, THEME_ERROR, "-", "Couldn't create tinyurl.");
-        return TRUE;
-    }
-
-    switch (window->type) {
-    case WIN_CHAT:
-    {
-        ProfChatWin* chatwin = (ProfChatWin*)window;
-        assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
-        cl_ev_send_msg(chatwin, tiny, NULL);
-        break;
-    }
-    case WIN_PRIVATE:
-    {
-        ProfPrivateWin* privatewin = (ProfPrivateWin*)window;
-        assert(privatewin->memcheck == PROFPRIVATEWIN_MEMCHECK);
-        cl_ev_send_priv_msg(privatewin, tiny, NULL);
-        break;
-    }
-    case WIN_MUC:
-    {
-        ProfMucWin* mucwin = (ProfMucWin*)window;
-        assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
-        cl_ev_send_muc_msg(mucwin, tiny, NULL);
-        break;
-    }
-    default:
-        break;
-    }
-
-    free(tiny);
-
-    return TRUE;
-}
-
-gboolean
 cmd_clear(ProfWin* window, const char* const command, gchar** args)
 {
     if (args[0] == NULL) {