Added /roster show|hide unsubscribed
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user