mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 08:56:21 +00:00
List ignored bookmarks
`/bookmarl ignore` lists the ignored bookmarks. Regards https://github.com/profanity-im/profanity/issues/1115
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
#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"
|
||||
#include "ui/window_list.h"
|
||||
@@ -4766,6 +4767,30 @@ cmd_bookmark(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_bookmark_ignore(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
jabber_conn_status_t conn_status = connection_get_status();
|
||||
|
||||
if (conn_status != JABBER_CONNECTED) {
|
||||
cons_show("You are not currently connected.");
|
||||
cons_alert();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// `/bookmark ignore` lists them
|
||||
if (args[1] == NULL) {
|
||||
gsize len;
|
||||
gchar **list = bookmark_ignore_list(&len);
|
||||
cons_show_bookmarks_ignore(list, len);
|
||||
g_strfreev(list);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_disco(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user