Changeset 1849c5b


Ignore:
Timestamp:
2021-03-29T14:08:27Z (4 years ago)
Author:
/ <>
Children:
a181ec1
Parents:
ef70f9f (diff), a42169b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'jabberblock' into integration_tests

Location:
protocols/jabber
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/Makefile

    ref70f9f r1849c5b  
    1313
    1414# [SH] Program variables
    15 objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o s5bytestream.o sasl.o si.o hipchat.o
     15objects = conference.o io.o iq.o jabber.o jabber_util.o message.o presence.o s5bytestream.o sasl.o si.o hipchat.o block.o
    1616
    1717LFLAGS += -r
  • protocols/jabber/iq.c

    ref70f9f r1849c5b  
    388388        struct xt_node *response;
    389389        struct jabber_data *jd = ic->proto_data;
    390        
     390
    391391        response = jabber_make_packet("iq", "result", jd->me, NULL);
    392392
     
    10071007{
    10081008        struct jabber_data *jd = ic->proto_data;
    1009         struct xt_node *query, *id;
     1009        struct xt_node *query, *id, *c;
     1010        char *feature;
    10101011
    10111012        if (!(query = xt_find_node(node->children, "query"))) {
    10121013                return XT_HANDLED;
     1014        }
     1015
     1016        c = query->children;
     1017
     1018        while ((c = xt_find_node(c, "feature"))) {
     1019                feature = xt_find_attr(c, "var");
     1020                if (feature) {
     1021                        jd->features = g_slist_append(jd->features, g_strdup(feature));
     1022                }
     1023                c = c->next;
    10131024        }
    10141025
     
    10401051                }
    10411052        }
     1053
     1054        jabber_block_feature(ic);
    10421055
    10431056        return XT_HANDLED;
  • protocols/jabber/jabber.h

    ref70f9f r1849c5b  
    109109        GHashTable *buddies;
    110110
     111        GSList *features;
    111112        GSList *filetransfers;
    112113        GSList *streamhosts;
     
    244245#define XMLNS_BYTESTREAMS  "http://jabber.org/protocol/bytestreams"              /* XEP-0065 */
    245246#define XMLNS_IBB          "http://jabber.org/protocol/ibb"                      /* XEP-0047 */
     247#define XMLNS_BLOCK        "urn:xmpp:blocking"                                   /* XEP-0191 */
    246248
    247249/* Hipchat protocol extensions*/
     
    283285int presence_send_update(struct im_connection *ic);
    284286int presence_send_request(struct im_connection *ic, char *handle, char *request);
     287
     288/* block.c */
     289void jabber_buddy_block(struct im_connection *ic, char *who);
     290void jabber_buddy_unblock(struct im_connection *ic, char *who);
     291void jabber_buddy_permit(struct im_connection *ic, char *who);
     292void jabber_buddy_unpermit(struct im_connection *ic, char *who);
     293int jabber_block_feature(struct im_connection *ic);
    285294
    286295/* jabber_util.c */
Note: See TracChangeset for help on using the changeset viewer.