Ignore:
Timestamp:
2008-02-15T17:38:57Z (17 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
506e61b
Parents:
0fbd3a6d (diff), eeb85a8 (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:

Merged with upstream r328

Wilmer van der Gaast 2008-02-11 Got rid of some noise at startup: complaining when the default configuration

Wilmer van der Gaast 2008-02-10 Added support for password-protected Jabber chatrooms.
Wilmer van der Gaast 2008-02-10 Making AI_ADDRCONFIG optional, it doesn't exist on at least NetBSD and
Wilmer van der Gaast 2008-02-09 Restored "add -tmp". A bit hackish, but it will do for now.
Wilmer van der Gaast 2008-02-07 Fixed getnameinfo() calls, this fixes Solaris stability issues. Thanks to
Wilmer van der Gaast 2008-02-04 Added bogus G_GNUC_MALLOC to restore GLib 2.4 compatibility (hopefully).
Wilmer van der Gaast 2008-02-03 Messages from the user are also included in backlogs when joining a Jabber
Wilmer van der Gaast 2008-02-03 Disabling "Unknown command" warnings since they're very noisy and pretty
Wilmer van der Gaast 2008-02-03 Implemented XEP-0115. This adds some info to the <presence/> tags so
Wilmer van der Gaast 2008-02-03 Saner garbage collection of cached packets in the Jabber module. Now
Wilmer van der Gaast 2008-02-02 Added help_free() and cleaned up some very stale help-related stuff I
Wilmer van der Gaast 2008-01-30 Fixed handling of OSCAR multi-part messages... They're not arrays, they're
Wilmer van der Gaast 2008-01-24 Keeping track of valid Jabber connections so _connected() events will be
Wilmer van der Gaast 2008-01-24 Fixed two valgrind warnings (partially uninitialized "struct tm" vars.)
Wilmer van der Gaast 2008-01-20 The Jabber module now uses imcb_chat_log() instead of imcb_log() where
Wilmer van der Gaast 2008-01-20 Added imcb_chat_log() for chatroom system messages, so they can be
Wilmer van der Gaast 2008-01-20 GET_BUDDY_FIRST wasn't actually implemented, even though it was in use
Wilmer van der Gaast 2008-01-19 Using test -f instead of test -e. This breaks if the include files are
Wilmer van der Gaast 2008-01-19 Added byte swapping code to the new MD5 checksumming code to make it work
Wilmer van der Gaast 2008-01-18 Moving imcb_chat_new() to a saner location (no code changes) and fixing
Wilmer van der Gaast 2008-01-17 Apparently ext_yahoo_got_im can be called with msg=NULL, so it should be
Wilmer van der Gaast 2008-01-17 Fixing some Solaris compiler warnings (u_int->uint, adding some typecasts
Wilmer van der Gaast 2008-01-13 Fixed handing of failed groupchat joins.
Wilmer van der Gaast 2008-01-13 Fixed "Conditional jump or move depends on uninitialised value(s)" at
Wilmer van der Gaast 2008-01-13 Fixed quickstart2. (Bug #349.)
Wilmer van der Gaast 2008-01-13 Different handling of charset mismatches before login time. Ignoring a
Wilmer van der Gaast 2008-01-12 When a switchboard connection dies (at the TCP level) and there are still
Wilmer van der Gaast 2008-01-12 Killed info_string_append() and now showing the IP address of ICQ users
Wilmer van der Gaast 2008-01-11 Fixing bug #344, now away states should always be correct, even when people
Wilmer van der Gaast 2008-01-11 Adding own handle to protocol name in blist output for people with multiple
Wilmer van der Gaast 2008-01-10 Now setting odata->icq properly again, this got lost some time ago, which
Wilmer van der Gaast 2008-01-06 More consistency in error/warning errors. Until now "WARNING:" was usually
Wilmer van der Gaast 2008-01-06 Changed warning message about unsent MSN messages. It should show the actual
Wilmer van der Gaast 2008-01-05 Added "mail_notifications" setting. Who needs those notifications anyway?
Wilmer van der Gaast 2008-01-05 Build fix from vmiklos.
Wilmer van der Gaast 2008-01-05 Added handling of MSN switchboard NAK messages. Untested, but hey, it
Wilmer van der Gaast 2008-01-05 Removed closure->result. I was planning to add some more stuff, but will
Miklos Vajna 2007-12-31 encode: md5.c is no longer in protocols/, it's in lib/
Wilmer van der Gaast 2007-12-28 Fixed return value check in proxy_connect(), since on some systems
Wilmer van der Gaast 2007-12-28 Added missing return in jabber_login().
Wilmer van der Gaast 2007-12-16 Implemented XEP-0199 (patch from misc@…).
Wilmer van der Gaast 2007-12-12 Checking conn->xcred before trying to clean it up since GnuTLS doesn't
Wilmer van der Gaast 2007-12-12 Killed the <server> parameter to "account add" and changed the default
Wilmer van der Gaast 2007-12-12 Fixed sockerr_again() usage in Jabber module to (hopefully) fix a 100% CPU
Wilmer van der Gaast 2007-12-10 Don't allow nicks that start with a number.
Wilmer van der Gaast 2007-12-10 Fixed "set xxx" syntax (it showed all settings instead of just xxx).
Wilmer van der Gaast 2007-12-09 If I keep forgetting to credit people in commit msgs I should probably add
Wilmer van der Gaast 2007-12-09 Added /invite support for Jabber chatrooms (and fixed the argument order

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/conference.c

    r0fbd3a6d r1ba7e8f  
    3737        xt_add_attr( node, "xmlns", XMLNS_MUC );
    3838        node = jabber_make_packet( "presence", NULL, roomjid, node );
     39        if( password )
     40                xt_add_child( node, xt_new_node( "password", password, NULL ) );
    3941        jabber_cache_add( ic, node, jabber_chat_join_failed );
    4042       
     
    7375       
    7476        room = xt_find_attr( orig, "to" );
    75         if( ( bud = jabber_buddy_by_jid( ic, room, 0 ) ) )
    76                 jabber_chat_free( jabber_chat_by_jid( ic, bud->bare_jid ) );
    77        
     77        bud = jabber_buddy_by_jid( ic, room, 0 );
    7878        err = jabber_error_parse( xt_find_node( node->children, "error" ), XMLNS_STANZA_ERROR );
    7979        if( err )
    8080        {
    81                 imcb_error( ic, "Error joining groupchat %s: %s%s%s",
    82                             bud->bare_jid, err->code, err->text ? ": " : "",
    83                             err->text ? err->text : "" );
     81                imcb_error( ic, "Error joining groupchat %s: %s%s%s", room, err->code,
     82                            err->text ? ": " : "", err->text ? err->text : "" );
    8483                jabber_error_free( err );
    8584        }
     85        if( bud )
     86                jabber_chat_free( jabber_chat_by_jid( ic, bud->bare_jid ) );
    8687       
    8788        return XT_HANDLED;
     
    123124        struct jabber_chat *jc = c->data;
    124125        struct xt_node *node;
     126       
     127        jc->flags |= JCFLAG_MESSAGE_SENT;
    125128       
    126129        node = xt_new_node( "body", message, NULL );
     
    296299        struct xt_node *subject = xt_find_node( node->children, "subject" );
    297300        struct xt_node *body = xt_find_node( node->children, "body" );
    298         struct groupchat *chat;
     301        struct groupchat *chat = bud ? jabber_chat_by_jid( ic, bud->bare_jid ) : NULL;
     302        struct jabber_chat *jc = chat ? chat->data : NULL;
    299303        char *s;
    300304       
    301         if( bud == NULL )
    302         {
     305        if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ) )
     306        {
     307                char *nick;
     308               
     309                if( body == NULL || body->text_len == 0 )
     310                        /* Meh. Empty messages aren't very interesting, no matter
     311                           how much some servers love to send them. */
     312                        return;
     313               
    303314                s = xt_find_attr( node, "from" ); /* pkt_message() already NULL-checked this one. */
    304                 if( strchr( s, '/' ) == NULL )
     315                nick = strchr( s, '/' );
     316                if( nick )
     317                {
     318                        /* If this message included a resource/nick we don't know,
     319                           we might still know the groupchat itself. */
     320                        *nick = 0;
     321                        chat = jabber_chat_by_jid( ic, s );
     322                        *nick = '/';
     323                       
     324                        nick ++;
     325                }
     326                else
     327                {
     328                        /* message.c uses the EXACT_JID option, so bud should
     329                           always be NULL here for bare JIDs. */
     330                        chat = jabber_chat_by_jid( ic, s );
     331                }
     332               
     333                if( nick == NULL )
     334                {
    305335                        /* This is fine, the groupchat itself isn't in jd->buddies. */
    306                         imcb_log( ic, "System message from groupchat %s: %s", s, body? body->text : "NULL" );
     336                        if( chat )
     337                                imcb_chat_log( chat, "From conference server: %s", body->text );
     338                        else
     339                                imcb_log( ic, "System message from unknown groupchat %s: %s", s, body->text );
     340                }
    307341                else
    308                         /* This, however, isn't fine! */
    309                         imcb_log( ic, "Groupchat message from unknown participant %s: %s", s, body ? body->text : "NULL" );
     342                {
     343                        /* This can happen too, at least when receiving a backlog when
     344                           just joining a channel. */
     345                        if( chat )
     346                                imcb_chat_log( chat, "Message from unknown participant %s: %s", nick, body->text );
     347                        else
     348                                imcb_log( ic, "Groupchat message from unknown JID %s: %s", s, body->text );
     349                }
    310350               
    311351                return;
    312352        }
    313         else if( ( chat = jabber_chat_by_jid( ic, bud->bare_jid ) ) == NULL )
     353        else if( chat == NULL )
    314354        {
    315355                /* How could this happen?? We could do kill( self, 11 )
Note: See TracChangeset for help on using the changeset viewer.