From abc2f0de39e39638fc519ad38de55d5ce0d93f28 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 7 Feb 2016 00:49:48 +0000 Subject: Added /roster show|hide unsubscribed --- src/command/command.c | 1 + src/command/commands.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'src/command') diff --git a/src/command/command.c b/src/command/command.c index d2d7f4ab..97d2dfc6 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -2266,6 +2266,7 @@ cmd_init(void) autocomplete_add(roster_show_ac, "empty"); autocomplete_add(roster_show_ac, "priority"); autocomplete_add(roster_show_ac, "contacts"); + autocomplete_add(roster_show_ac, "unsubscribed"); autocomplete_add(roster_show_ac, "rooms"); roster_by_ac = autocomplete_new(); diff --git a/src/command/commands.c b/src/command/commands.c index 6570f13d..6a9972b6 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2245,6 +2245,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "unsubscribed") == 0) { + cons_show("Roster unsubscribed enabled"); + prefs_set_boolean(PREF_ROSTER_UNSUBSCRIBED, TRUE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else { cons_bad_cmd_usage(command); return TRUE; @@ -2313,6 +2320,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "unsubscribed") == 0) { + cons_show("Roster unsubscribed disabled"); + prefs_set_boolean(PREF_ROSTER_UNSUBSCRIBED, FALSE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else { cons_bad_cmd_usage(command); return TRUE; -- cgit 1.4.1-2-gfad0