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.c1
-rw-r--r--src/command/commands.c14
2 files changed, 15 insertions, 0 deletions
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;