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

Moved handle_room_list and handle_disco_items to server_events

This commit is contained in:
James Booth 2014-01-05 21:20:15 +00:00
parent b14d5707cb
commit d083a5407d
5 changed files with 18 additions and 18 deletions

View File

@ -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 * Take a line of input and process it, return TRUE if profanity is to
* continue, FALSE otherwise * continue, FALSE otherwise

View File

@ -67,8 +67,6 @@ void prof_handle_room_invite(jabber_invite_t invite_type,
const char * const reason); const char * const reason);
void prof_handle_idle(void); void prof_handle_idle(void);
void prof_handle_activity(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_help(const char * const result);
void prof_handle_duck_result(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); void prof_handle_roster_add(const char * const barejid, const char * const name);

View File

@ -90,3 +90,17 @@ handle_disco_info(const char *from, GSList *identities, GSList *features)
cons_show_disco_info(from, identities, features); cons_show_disco_info(from, identities, features);
ui_current_page_off(); 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();
}

View File

@ -30,5 +30,7 @@ void handle_failed_login(void);
void handle_software_version_result(const char * const jid, const char * const presence, 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); 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_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 #endif

View File

@ -559,9 +559,9 @@ _iq_handle_discoitems_result(xmpp_conn_t * const conn, xmpp_stanza_t * const sta
} }
if (g_strcmp0(id, "confreq") == 0) { if (g_strcmp0(id, "confreq") == 0) {
prof_handle_room_list(items, from); handle_room_list(items, from);
} else if (g_strcmp0(id, "discoitemsreq") == 0) { } 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); g_slist_free_full(items, (GDestroyNotify)_item_destroy);