source: protocols/jabber/presence.c @ dd788bb

Last change on this file since dd788bb was 0b4a0db, checked in by Wilmer van der Gaast <wilmer@…>, at 2006-09-20T20:26:47Z

Now parsing roster properly. (Hopefully...)

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/***************************************************************************\
2*                                                                           *
3*  BitlBee - An IRC to IM gateway                                           *
4*  Jabber module - Handling of presence (tags), etc                         *
5*                                                                           *
6*  Copyright 2006 Wilmer van der Gaast <wilmer@gaast.net>                   *
7*                                                                           *
8*  This program is free software; you can redistribute it and/or modify     *
9*  it under the terms of the GNU General Public License as published by     *
10*  the Free Software Foundation; either version 2 of the License, or        *
11*  (at your option) any later version.                                      *
12*                                                                           *
13*  This program is distributed in the hope that it will be useful,          *
14*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
16*  GNU General Public License for more details.                             *
17*                                                                           *
18*  You should have received a copy of the GNU General Public License along  *
19*  with this program; if not, write to the Free Software Foundation, Inc.,  *
20*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
21*                                                                           *
22\***************************************************************************/
23
24#include "jabber.h"
25
26xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
27{
28        char *from = xt_find_attr( node, "from" );
29       
30        printf( "Received PRES from %s:\n", from );
31        xt_print( node );
32       
33        return XT_HANDLED;
34}
35
36int presence_announce( struct gaim_connection *gc )
37{
38        struct xt_node *node;
39        int st;
40       
41        node = jabber_make_packet( "presence", NULL, NULL, NULL );
42       
43        st = jabber_write_packet( gc, node );
44       
45        if( st )
46                account_online( gc );
47       
48        xt_free_node( node );
49        return st;
50}
Note: See TracBrowser for help on using the repository browser.