1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Allow setting "none" affiliation

This commit is contained in:
James Booth 2014-10-06 00:38:29 +01:00
parent d12534c58e
commit 2aeaad230e
2 changed files with 7 additions and 1 deletions

View File

@ -1259,6 +1259,7 @@ cmd_init(void)
autocomplete_add(room_affiliation_ac, "owner");
autocomplete_add(room_affiliation_ac, "admin");
autocomplete_add(room_affiliation_ac, "member");
autocomplete_add(room_affiliation_ac, "none");
autocomplete_add(room_affiliation_ac, "outcast");
room_role_ac = autocomplete_new();

View File

@ -2206,13 +2206,18 @@ cmd_room(gchar **args, struct cmd_help_t help)
if ((g_strcmp0(affiliation, "owner") != 0) &&
(g_strcmp0(affiliation, "admin") != 0) &&
(g_strcmp0(affiliation, "member") != 0) &&
(g_strcmp0(affiliation, "none") != 0) &&
(g_strcmp0(affiliation, "outcast") != 0)) {
cons_show("Usage: %s", help.usage);
return TRUE;
}
if (g_strcmp0(cmd, "list") == 0) {
iq_room_affiliation_list(room, affiliation);
if (g_strcmp0(affiliation, "none") == 0) {
win_save_print(window, '!', NULL, 0, 0, "", "Cannot list users with no affiliation.");
} else {
iq_room_affiliation_list(room, affiliation);
}
return TRUE;
}