about summary refs log tree commit diff stats
path: root/src/ui/windows.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-12-16 23:37:23 +0000
committerJames Booth <boothj5@gmail.com>2014-12-16 23:37:23 +0000
commit4dc48b4b48c0bfd337dc3a678254d2eff1be6f6d (patch)
tree499ec3b9c989f18adb97975f44d93bfaa9671757 /src/ui/windows.c
parent052eee3c3e028fe6f631a7af05e503021dbcf79a (diff)
downloadprofani-tty-4dc48b4b48c0bfd337dc3a678254d2eff1be6f6d.tar.gz
Added occupantswin.c
Diffstat (limited to 'src/ui/windows.c')
-rw-r--r--src/ui/windows.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 751f068d..5e8c6a9f 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -183,6 +183,25 @@ wins_get_by_recipient(const char * const recipient)
     return NULL;
 }
 
+ProfMucWin *
+wins_get_muc_win(const char * const roomjid)
+{
+    GList *values = g_hash_table_get_values(windows);
+    GList *curr = values;
+
+    while (curr != NULL) {
+        ProfWin *window = curr->data;
+        if ((g_strcmp0(window->from, roomjid) == 0) && window->type == WIN_MUC) {
+            g_list_free(values);
+            return (ProfMucWin*)window;
+        }
+        curr = g_list_next(curr);
+    }
+
+    g_list_free(values);
+    return NULL;
+}
+
 int
 wins_get_num(ProfWin *window)
 {