mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 11:46:21 +00:00
MUC: Show offline members in sidebar
This commit is contained in:
@@ -790,6 +790,7 @@ cmd_ac_init(void)
|
||||
|
||||
occupants_show_ac = autocomplete_new();
|
||||
autocomplete_add(occupants_show_ac, "jid");
|
||||
autocomplete_add(occupants_show_ac, "offline");
|
||||
|
||||
occupants_char_ac = autocomplete_new();
|
||||
autocomplete_add(occupants_char_ac, "none");
|
||||
|
||||
@@ -4370,6 +4370,9 @@ cmd_occupants(ProfWin* window, const char* const command, gchar** args)
|
||||
if (g_strcmp0(args[2], "jid") == 0) {
|
||||
cons_show("Occupant jids enabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS_JID, TRUE);
|
||||
} else if (g_strcmp0(args[2], "offline") == 0) {
|
||||
cons_show("Occupants offline enabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS_OFFLINE, TRUE);
|
||||
} else {
|
||||
cons_show("Occupant list enabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS, TRUE);
|
||||
@@ -4379,6 +4382,9 @@ cmd_occupants(ProfWin* window, const char* const command, gchar** args)
|
||||
if (g_strcmp0(args[2], "jid") == 0) {
|
||||
cons_show("Occupant jids disabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS_JID, FALSE);
|
||||
} else if (g_strcmp0(args[2], "offline") == 0) {
|
||||
cons_show("Occupants offline disabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS_OFFLINE, FALSE);
|
||||
} else {
|
||||
cons_show("Occupant list disabled.");
|
||||
prefs_set_boolean(PREF_OCCUPANTS, FALSE);
|
||||
@@ -4430,6 +4436,9 @@ cmd_occupants(ProfWin* window, const char* const command, gchar** args)
|
||||
if (g_strcmp0(args[1], "jid") == 0) {
|
||||
mucwin->showjid = TRUE;
|
||||
mucwin_update_occupants(mucwin);
|
||||
} else if (g_strcmp0(args[1], "offline") == 0) {
|
||||
mucwin->showoffline = TRUE;
|
||||
mucwin_update_occupants(mucwin);
|
||||
} else {
|
||||
mucwin_show_occupants(mucwin);
|
||||
}
|
||||
@@ -4437,6 +4446,9 @@ cmd_occupants(ProfWin* window, const char* const command, gchar** args)
|
||||
if (g_strcmp0(args[1], "jid") == 0) {
|
||||
mucwin->showjid = FALSE;
|
||||
mucwin_update_occupants(mucwin);
|
||||
} else if (g_strcmp0(args[1], "offline") == 0) {
|
||||
mucwin->showoffline = FALSE;
|
||||
mucwin_update_occupants(mucwin);
|
||||
} else {
|
||||
mucwin_hide_occupants(mucwin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user