Store room affiliation and role

This commit is contained in:
James Booth
2014-09-28 01:55:24 +01:00
parent a4f7932ed7
commit 41b49cb5d6
7 changed files with 208 additions and 20 deletions

View File

@@ -2083,7 +2083,8 @@ cmd_room(gchar **args, struct cmd_help_t help)
if ((g_strcmp0(args[0], "accept") != 0) &&
(g_strcmp0(args[0], "destroy") != 0) &&
(g_strcmp0(args[0], "config") != 0)) {
(g_strcmp0(args[0], "config") != 0) &&
(g_strcmp0(args[0], "info") != 0)) {
cons_show("Usage: %s", help.usage);
return TRUE;
}
@@ -2097,6 +2098,13 @@ cmd_room(gchar **args, struct cmd_help_t help)
ui_index = 0;
}
if (g_strcmp0(args[0], "info") == 0) {
char *role = muc_get_role_str(room);
char *affiliation = muc_get_affiliation_str(room);
ui_current_print_line("Affiliation: %s, Role: %s", affiliation, role);
return TRUE;
}
if (g_strcmp0(args[0], "accept") == 0) {
gboolean requires_config = muc_requires_config(room);
if (!requires_config) {