Changeset bd5eee3 for protocols


Ignore:
Timestamp:
2010-05-09T09:48:56Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e5abfd4
Parents:
75610c3 (diff), 5a599a1 (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:

Merging mainline, mostly for chatroom fixes I implemented there.

Location:
protocols
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    r75610c3 rbd5eee3  
    26592659       
    26602660        c = imcb_chat_new(ic, chatname);
    2661 
    26622661        ret = oscar_chat_join(ic, chatname, NULL, NULL);
    2663 
    26642662        aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);
    26652663
  • protocols/twitter/twitter.c

    r75610c3 rbd5eee3  
    144144}
    145145
     146static gboolean twitter_length_check( struct im_connection *ic, gchar *msg )
     147{
     148        int max = set_getint( &ic->acc->set, "message_length" ), len;
     149       
     150        if( max == 0 || ( len = g_utf8_strlen( msg, -1 ) ) <= max )
     151                return TRUE;
     152       
     153        imcb_error( ic, "Maximum message length exceeded: %d > %d", len, max );
     154       
     155        return FALSE;
     156}
     157
    146158static void twitter_init( account_t *acc )
    147159{
    148160        set_t *s;
     161       
     162        s = set_add( &acc->set, "message_length", "140", set_eval_int, acc );
    149163       
    150164        s = set_add( &acc->set, "mode", "one", set_eval_mode, acc );
     
    231245                        }
    232246                }
    233                 else
     247                else if( twitter_length_check(ic, message) )
    234248                        twitter_post_status(ic, message);
    235249        }
     
    262276static void twitter_chat_msg( struct groupchat *c, char *message, int flags )
    263277{
    264         if( c && message )
     278        if( c && message && twitter_length_check(c->ic, message))
    265279                twitter_post_status(c->ic, message);
    266280}
  • protocols/yahoo/yahoo.c

    r75610c3 rbd5eee3  
    832832        YList *m;
    833833       
     834        if( g_strcasecmp( who, ic->acc->user ) == 0 )
     835                /* WTF, Yahoo! seems to echo these now? */
     836                return;
     837       
    834838        inv = g_malloc( sizeof( struct byahoo_conf_invitation ) );
    835839        memset( inv, 0, sizeof( struct byahoo_conf_invitation ) );
Note: See TracChangeset for help on using the changeset viewer.