X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fchat.git;a=blobdiff_plain;f=tictactoe.c;h=b77451201b5b09a1fd448a73614eddb9f0403ffa;hp=b57c1b9e945f9464dccbdf5a536a00041ed01ac2;hb=5cbc971e8563b2c364da4c014fb0418706720a94;hpb=8729c58972d65ab4b4b7ef3da9bcaf0d7f237d4c diff --git a/tictactoe.c b/tictactoe.c index b57c1b9..b774512 100644 --- a/tictactoe.c +++ b/tictactoe.c @@ -28,18 +28,14 @@ #include "xmpp.h" #include "sasl.h" #include "bind.h" +#include "disco.h" static void write_stream (hc_xmpp_t *); static void send_message_test (hc_xmpp_t *xmpp) { - iks *msg; - msg = iks_new ("message"); - iks_insert_attrib (msg, "to", "metal@jabber-br.org"); - iks_insert_cdata (iks_insert (msg, "body"), "pubsub", 0); - hc_xmpp_send_iks (xmpp, msg); - iks_delete (msg); + hc_xmpp_send_disco_info (xmpp, ""); } static int @@ -61,6 +57,10 @@ myhook (void *data, int type, iks *stanza) if (hc_xmpp_status (data) == HC_XMPP_SESSION) send_message_test (data); } + else if (!iks_strcmp (ns, HC_XMPP_NS_DISCO_INFO)) + { + hc_xmpp_recv_disco (data, stanza); + } } else if (!iks_strcmp (iks_name (stanza), "stream:features")) {