Changeset f5c0d8e for protocols


Ignore:
Timestamp:
2010-08-31T20:06:14Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0c85c08
Parents:
8358691 (diff), 31dbb90a (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 mainline stuff.

Location:
protocols
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • protocols/Makefile

    r8358691 rf5c0d8e  
    4040
    4141distclean: clean $(subdirs)
     42        rm -rf .depend
    4243
    4344$(subdirs):
     
    5556        @echo '*' Compiling $<
    5657        @$(CC) -c $(CFLAGS) $< -o $@
     58
     59-include .depend/*.d
  • protocols/bee.h

    r8358691 rf5c0d8e  
    123123        gboolean (*chat_topic)( bee_t *bee, struct groupchat *c, const char *new, bee_user_t *bu );
    124124        gboolean (*chat_name_hint)( bee_t *bee, struct groupchat *c, const char *name );
     125        gboolean (*chat_invite)( bee_t *bee, bee_user_t *bu, const char *name, const char *msg );
    125126       
    126127        struct file_transfer* (*ft_in_start)( bee_t *bee, bee_user_t *bu, const char *file_name, size_t file_size );
     
    175176G_MODULE_EXPORT int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags );
    176177G_MODULE_EXPORT struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title );
     178G_MODULE_EXPORT void imcb_chat_invite( struct im_connection *ic, const char *name, const char *who, const char *msg );
    177179
    178180#endif /* __BEE_H__ */
  • protocols/bee_chat.c

    r8358691 rf5c0d8e  
    233233        return NULL;
    234234}
     235
     236void imcb_chat_invite( struct im_connection *ic, const char *name, const char *who, const char *msg )
     237{
     238        bee_user_t *bu = bee_user_by_handle( ic->bee, ic, who );
     239       
     240        if( bu && ic->bee->ui->chat_invite )
     241                ic->bee->ui->chat_invite( ic->bee, bu, name, msg );
     242}
  • protocols/jabber/Makefile

    r8358691 rf5c0d8e  
    3030
    3131distclean: clean
     32        rm -rf .depend
    3233
    3334### MAIN PROGRAM
     
    4243        @echo '*' Linking jabber_mod.o
    4344        @$(LD) $(LFLAGS) $(objects) -o jabber_mod.o
     45
     46-include .depend/*.d
  • protocols/jabber/jabber.h

    r8358691 rf5c0d8e  
    5959        JBFLAG_IS_ANONYMOUS = 8,        /* For anonymous chatrooms, when we don't have
    6060                                           have a real JID. */
     61        JBFLAG_HIDE_SUBJECT = 16,       /* Hide the subject field since we probably
     62                                           showed it already. */
    6163} jabber_buddy_flags_t;
    6264
  • protocols/jabber/message.c

    r8358691 rf5c0d8e  
    3131        struct xt_node *body = xt_find_node( node->children, "body" ), *c;
    3232        struct jabber_buddy *bud = NULL;
    33         char *s;
     33        char *s, *room = NULL, *reason = NULL;
    3434       
    3535        if( !from )
     
    5252                for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next )
    5353                {
    54                         char *ns = xt_find_attr( c, "xmlns" ), *room;
    55                         struct xt_node *inv, *reason;
     54                        char *ns = xt_find_attr( c, "xmlns" );
     55                        struct xt_node *inv;
    5656                       
    5757                        if( ns && strcmp( ns, XMLNS_MUC_USER ) == 0 &&
    5858                            ( inv = xt_find_node( c->children, "invite" ) ) )
    5959                        {
     60                                /* This is an invitation. Set some vars which
     61                                   will be passed to imcb_chat_invite() below. */
    6062                                room = from;
    6163                                if( ( from = xt_find_attr( inv, "from" ) ) == NULL )
    6264                                        from = room;
    63 
    64                                 g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room );
    65                                 if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 )
    66                                         g_string_append( fullmsg, reason->text );
     65                                if( ( inv = xt_find_node( inv->children, "reason" ) ) && inv->text_len > 0 )
     66                                        reason = inv->text;
    6767                        }
    6868                }
     
    9393                        }
    9494                }
    95                 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 )
     95                else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 &&
     96                         ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) )
    9697                {
    9798                        g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text );
     99                        if( bud )
     100                                bud->flags |= JBFLAG_HIDE_SUBJECT;
     101                }
     102                else if( bud && !c )
     103                {
     104                        /* Yeah, possibly we're hiding changes to this field now. But nobody uses
     105                           this for anything useful anyway, except GMail when people reply to an
     106                           e-mail via chat, repeating the same subject all the time. I don't want
     107                           to have to remember full subject strings for everyone. */
     108                        bud->flags &= ~JBFLAG_HIDE_SUBJECT;
    98109                }
    99110               
     
    104115                        imcb_buddy_msg( ic, from, fullmsg->str,
    105116                                        0, jabber_get_timestamp( node ) );
     117                if( room )
     118                        imcb_chat_invite( ic, room, from, reason );
    106119               
    107120                g_string_free( fullmsg, TRUE );
  • protocols/jabber/si.c

    r8358691 rf5c0d8e  
    262262                                break;
    263263                        }
     264                        else
     265                        {
     266                                c = c->next;
     267                        }
    264268
    265269                if ( !requestok )
  • protocols/msn/Makefile

    r8358691 rf5c0d8e  
    3030
    3131distclean: clean
     32        rm -rf .depend
    3233
    3334### MAIN PROGRAM
     
    4243        @echo '*' Linking msn_mod.o
    4344        @$(LD) $(LFLAGS) $(objects) -o msn_mod.o
    44        
    4545
     46-include .depend/*.d
  • protocols/oscar/Makefile

    r8358691 rf5c0d8e  
    3131
    3232distclean: clean
     33        rm -rf .depend
    3334
    3435### MAIN PROGRAM
     
    4344        @echo '*' Linking oscar_mod.o
    4445        @$(LD) $(LFLAGS) $(objects) -o oscar_mod.o
     46
     47-include .depend/*.d
  • protocols/oscar/oscar.c

    r8358691 rf5c0d8e  
    517517                        /* Incorrect nick/password */
    518518                        imcb_error(ic, _("Incorrect nickname or password."));
     519                        {
     520                                int max = od->icq ? 8 : 16;
     521                                if (strlen(ic->acc->pass) > max)
     522                                        imcb_log(ic, "Note that the maximum password "
     523                                                 "length supported by this protocol is "
     524                                                 "%d characters, try logging in using "
     525                                                 "a shorter password.", max);
     526                        }
    519527//                      plugin_event(event_error, (void *)980, 0, 0, 0);
    520528                        break;
  • protocols/purple/Makefile

    r8358691 rf5c0d8e  
    3131
    3232distclean: clean
     33        rm -rf .depend
    3334
    3435### MAIN PROGRAM
     
    4344        @echo '*' Linking purple_mod.o
    4445        $(LD) $(LFLAGS) $(objects) -o purple_mod.o
     46
     47-include .depend/*.d
  • protocols/twitter/Makefile

    r8358691 rf5c0d8e  
    3030
    3131distclean: clean
     32        rm -rf .depend
    3233
    3334### MAIN PROGRAM
     
    4344        @$(LD) $(LFLAGS) $(objects) -o twitter_mod.o
    4445       
    45 
     46-include .depend/*.d
  • protocols/twitter/twitter.c

    r8358691 rf5c0d8e  
    195195        s = set_add( &acc->set, "message_length", "140", set_eval_int, acc );
    196196       
    197         s = set_add( &acc->set, "mode", "one", set_eval_mode, acc );
     197        s = set_add( &acc->set, "mode", "chat", set_eval_mode, acc );
    198198        s->flags |= ACC_SET_OFFLINE_ONLY;
    199199       
  • protocols/yahoo/Makefile

    r8358691 rf5c0d8e  
    3131
    3232distclean: clean
     33        rm -rf .depend
    3334
    3435### MAIN PROGRAM
     
    4344        @echo '*' Linking yahoo_mod.o
    4445        @$(LD) $(LFLAGS) $(objects) -o yahoo_mod.o
     46
     47-include .depend/*.d
  • protocols/yahoo/libyahoo2.c

    r8358691 rf5c0d8e  
    21692169        yd->buddies = y_list_append(yd->buddies, bud);
    21702170
     2171#if 0
     2172        /* BitlBee: This seems to be wrong in my experience. I think:
     2173           status = 0: Success
     2174           status = 2: Already on list
     2175           status = 3: Doesn't exist
     2176           status = 42: Invalid handle (possibly banned/reserved, I get it for
     2177                        handles like joe or jjjjjj)
     2178           Haven't seen others yet. But whenever the add is successful, there
     2179           will be a separate "went online" packet when the auth. request is
     2180           accepted. Couldn't find any test account that doesn't require auth.
     2181           unfortunately (if there is even such a thing?) */
     2182           
    21712183        /* A non-zero status (i've seen 2) seems to mean the buddy is already
    21722184         * added and is online */
     
    21762188                YAHOO_CALLBACK(ext_yahoo_status_changed) (yd->client_id, who,
    21772189                        YAHOO_STATUS_AVAILABLE, NULL, 0, 0, 0);
     2190        }
     2191#endif
     2192        /* BitlBee: Need ACK of added buddy, if it was successful. */
     2193        if (status == 0) {
     2194                YList *tmp = y_list_append(NULL, bud);
     2195                YAHOO_CALLBACK(ext_yahoo_got_buddies) (yd->client_id, tmp);
     2196                y_list_free(tmp);
    21782197        }
    21792198}
Note: See TracChangeset for help on using the changeset viewer.