about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-11-02 00:40:23 +0000
committerJames Booth <boothj5@gmail.com>2015-11-02 00:40:23 +0000
commit3341e8c202b606b6d8b4ab1eed376ef9b58eb9e9 (patch)
tree19ba72219b18da8ceecc4293481ccc44f93322c8 /src/ui
parentd81dbdb23370374d972a97c046b76f81f2094f9f (diff)
downloadprofani-tty-3341e8c202b606b6d8b4ab1eed376ef9b58eb9e9.tar.gz
mucwin_handle_affiliation_list takes ProfMucWin
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/mucwin.c30
-rw-r--r--src/ui/ui.h2
2 files changed, 16 insertions, 16 deletions
diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c
index 92ab02e7..d13a89f1 100644
--- a/src/ui/mucwin.c
+++ b/src/ui/mucwin.c
@@ -537,23 +537,23 @@ mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation,
 }
 
 void
-mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids)
+mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids)
 {
-    ProfWin *window = (ProfWin*)wins_get_muc(roomjid);
-    if (window) {
-        if (jids) {
-            win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
-            GSList *curr_jid = jids;
-            while (curr_jid) {
-                char *jid = curr_jid->data;
-                win_vprint(window, '!', 0, NULL, 0, 0, "", "  %s", jid);
-                curr_jid = g_slist_next(curr_jid);
-            }
-            win_print(window, '!', 0, NULL, 0, 0, "", "");
-        } else {
-            win_vprint(window, '!', 0, NULL, 0, 0, "", "No users found with affiliation: %s", affiliation);
-            win_print(window, '!', 0, NULL, 0, 0, "", "");
+    assert(mucwin != NULL);
+
+    ProfWin *window = (ProfWin*)mucwin;
+    if (jids) {
+        win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
+        GSList *curr_jid = jids;
+        while (curr_jid) {
+            char *jid = curr_jid->data;
+            win_vprint(window, '!', 0, NULL, 0, 0, "", "  %s", jid);
+            curr_jid = g_slist_next(curr_jid);
         }
+        win_print(window, '!', 0, NULL, 0, 0, "", "");
+    } else {
+        win_vprint(window, '!', 0, NULL, 0, 0, "", "No users found with affiliation: %s", affiliation);
+        win_print(window, '!', 0, NULL, 0, 0, "", "");
     }
 }
 
diff --git a/src/ui/ui.h b/src/ui/ui.h
index 05cc6a84..6dd32000 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -198,7 +198,7 @@ void mucwin_update_occupants(const char *const roomjid);
 void mucwin_show_occupants(const char *const roomjid);
 void mucwin_hide_occupants(const char *const roomjid);
 void mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation, const char *const error);
-void mucwin_handle_affiliation_list(const char *const roomjid, const char *const affiliation, GSList *jids);
+void mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation, GSList *jids);
 void mucwin_affiliation_set_error(const char *const roomjid, const char *const jid,
     const char *const affiliation, const char *const error);
 void mucwin_role_set_error(const char *const roomjid, const char *const nick, const char *const role,