Ignore:
Timestamp:
2016-10-17T02:46:33Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
4466e3e
Parents:
2906268
Message:

jabber: Implement chat list command

Also applies to hipchat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r2906268 r399d65a  
    321321        struct jabber_data *jd = ic->proto_data;
    322322
     323        imcb_chat_list_free(ic);
     324
    323325        while (jd->filetransfers) {
    324326                imcb_file_canceled(ic, (( struct jabber_transfer *) jd->filetransfers->data)->ft, "Logging out");
     
    593595}
    594596
     597static void jabber_chat_list_(struct im_connection *ic, const char *server)
     598{
     599        struct jabber_data *jd = ic->proto_data;
     600
     601        if (server && *server) {
     602                jabber_iq_disco_muc(ic, server);
     603        } else if (jd->muc_host && *jd->muc_host) {
     604                jabber_iq_disco_muc(ic, jd->muc_host);
     605        } else {
     606                /* throw an error here, don't query conference.[server] directly.
     607                 * for things like jabber.org it gets you 18000 results of garbage */
     608                imcb_error(ic, "Please specify a server name such as `conference.%s'", jd->server);
     609        }
     610}
     611
    595612static void jabber_chat_msg_(struct groupchat *c, char *message, int flags)
    596613{
     
    768785        ret->chat_join = jabber_chat_join_;
    769786        ret->chat_with = jabber_chat_with_;
     787        ret->chat_list = jabber_chat_list_;
    770788        ret->chat_add_settings = jabber_chat_add_settings;
    771789        ret->chat_free_settings = jabber_chat_free_settings;
Note: See TracChangeset for help on using the changeset viewer.