diff --git a/src/profanity.c b/src/profanity.c index e7a83b39..cf3ca674 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -459,20 +459,6 @@ prof_handle_activity(void) } } -void -prof_handle_room_list(GSList *rooms, const char *conference_node) -{ - cons_show_room_list(rooms, conference_node); - ui_current_page_off(); -} - -void -prof_handle_disco_items(GSList *items, const char *jid) -{ - cons_show_disco_items(items, jid); - ui_current_page_off(); -} - /* * Take a line of input and process it, return TRUE if profanity is to * continue, FALSE otherwise diff --git a/src/profanity.h b/src/profanity.h index 5351aa0e..112a7c6d 100644 --- a/src/profanity.h +++ b/src/profanity.h @@ -67,8 +67,6 @@ void prof_handle_room_invite(jabber_invite_t invite_type, const char * const reason); void prof_handle_idle(void); void prof_handle_activity(void); -void prof_handle_room_list(GSList *rooms, const char *conference_node); -void prof_handle_disco_items(GSList *items, const char *jid); void prof_handle_duck_help(const char * const result); void prof_handle_duck_result(const char * const result); void prof_handle_roster_add(const char * const barejid, const char * const name); diff --git a/src/server_events.c b/src/server_events.c index 4e03d2d6..18d22bf6 100644 --- a/src/server_events.c +++ b/src/server_events.c @@ -90,3 +90,17 @@ handle_disco_info(const char *from, GSList *identities, GSList *features) cons_show_disco_info(from, identities, features); ui_current_page_off(); } + +void +handle_room_list(GSList *rooms, const char *conference_node) +{ + cons_show_room_list(rooms, conference_node); + ui_current_page_off(); +} + +void +handle_disco_items(GSList *items, const char *jid) +{ + cons_show_disco_items(items, jid); + ui_current_page_off(); +} diff --git a/src/server_events.h b/src/server_events.h index 13135281..f9a7b3ed 100644 --- a/src/server_events.h +++ b/src/server_events.h @@ -30,5 +30,7 @@ void handle_failed_login(void); void handle_software_version_result(const char * const jid, const char * const presence, const char * const name, const char * const version, const char * const os); void handle_disco_info(const char *from, GSList *identities, GSList *features); +void handle_room_list(GSList *rooms, const char *conference_node); +void handle_disco_items(GSList *items, const char *jid); #endif diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 8d42ede3..3e598c10 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -559,9 +559,9 @@ _iq_handle_discoitems_result(xmpp_conn_t * const conn, xmpp_stanza_t * const sta } if (g_strcmp0(id, "confreq") == 0) { - prof_handle_room_list(items, from); + handle_room_list(items, from); } else if (g_strcmp0(id, "discoitemsreq") == 0) { - prof_handle_disco_items(items, from); + handle_disco_items(items, from); } g_slist_free_full(items, (GDestroyNotify)_item_destroy);