Ignore:
Timestamp:
2007-06-04T11:32:37Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
54f2f55
Parents:
6286f80
Message:

Added a real XML-console to the Jabber module! Add the handle "xmlconsole"
(without any @server part) to your contact list and you'll see all XMPP
traffic going in and out, and messages sent to the buddy will be sent as
packets to the server.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r6286f80 rbb95d43  
    226226        int st;
    227227       
     228        if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
     229                return jabber_write( ic, message, strlen( message ) );
     230       
    228231        bud = jabber_buddy_by_jid( ic, who, 0 );
    229232       
     
    311314static void jabber_add_buddy( struct im_connection *ic, char *who, char *group )
    312315{
     316        struct jabber_data *jd = ic->proto_data;
     317       
     318        if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
     319        {
     320                jd->flags |= JFLAG_XMLCONSOLE;
     321                imcb_add_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL );
     322                return;
     323        }
     324       
    313325        if( jabber_add_to_roster( ic, who, NULL ) )
    314326                presence_send_request( ic, who, "subscribe" );
     
    317329static void jabber_remove_buddy( struct im_connection *ic, char *who, char *group )
    318330{
     331        struct jabber_data *jd = ic->proto_data;
     332       
     333        if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
     334        {
     335                jd->flags &= ~JFLAG_XMLCONSOLE;
     336                /* FIXME imcb_remove_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); */
     337                return;
     338        }
     339       
    319340        /* We should always do this part. Clean up our administration a little bit. */
    320341        jabber_buddy_remove_bare( ic, who );
Note: See TracChangeset for help on using the changeset viewer.