Changeset eaaa986


Ignore:
Timestamp:
2010-05-08T14:48:38Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e685657
Parents:
4a9fd5f
Message:

Misc. cleanup. Also updated the Yahoo! module to deal with struct groupchat
in a GSList so that a default config fully compiles again.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r4a9fd5f reaaa986  
    242242        g_free( irc->readbuffer );
    243243        g_free( irc->password );
     244        g_free( irc->last_root_cmd );
    244245       
    245246        g_free( irc );
  • irc_commands.c

    r4a9fd5f reaaa986  
    536536static void irc_cmd_away( irc_t *irc, char **cmd )
    537537{
    538         char *set;
    539        
    540538        if( cmd[1] && *cmd[1] )
    541539        {
  • protocols/bee.h

    r4a9fd5f reaaa986  
    129129#endif
    130130int bee_chat_msg( bee_t *bee, struct groupchat *c, const char *msg, int flags );
     131struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title );
    131132
    132133#endif /* __BEE_H__ */
  • protocols/bee_chat.c

    r4a9fd5f reaaa986  
    218218        return 1;
    219219}
     220
     221struct groupchat *bee_chat_by_title( bee_t *bee, struct im_connection *ic, const char *title )
     222{
     223        struct groupchat *c;
     224        GSList *l;
     225       
     226        for( l = ic->groupchats; l; l = l->next )
     227        {
     228                c = l->data;
     229                if( strcmp( c->title, title ) == 0 )
     230                        return c;
     231        }
     232       
     233        return NULL;
     234}
  • protocols/jabber/presence.c

    r4a9fd5f reaaa986  
    205205        struct jabber_data *jd = ic->proto_data;
    206206        struct xt_node *node, *cap;
    207         struct groupchat *c;
    208207        GSList *l;
    209208        int st;
  • protocols/yahoo/yahoo.c

    r4a9fd5f reaaa986  
    153153       
    154154        while( ic->groupchats )
    155                 imcb_chat_free( ic->groupchats );
     155                imcb_chat_free( ic->groupchats->data );
    156156       
    157157        for( l = yd->buddygroups; l; l = l->next )
     
    791791        struct byahoo_conf_invitation *inv = data;
    792792        struct groupchat *b;
    793        
    794         for( b = inv->ic->groupchats; b; b = b->next )
     793        GSList *l;
     794       
     795        for( l = inv->ic->groupchats; l; l = l->next )
     796        {
     797                b = l->data;
    795798                if( b == inv->c )
    796799                        break;
     800        }
    797801       
    798802        if( b != NULL )
     
    856860{
    857861        struct im_connection *ic = byahoo_get_ic_by_id( id );
    858         struct groupchat *c;
    859        
    860         for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next );
     862        struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );
    861863       
    862864        if( c )
     
    868870{
    869871        struct im_connection *ic = byahoo_get_ic_by_id( id );
    870         struct groupchat *c;
    871        
    872         for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next );
     872        struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );
    873873       
    874874        if( c )
     
    880880        struct im_connection *ic = byahoo_get_ic_by_id( id );
    881881        char *m = byahoo_strip( msg );
    882         struct groupchat *c;
    883        
    884         for( c = ic->groupchats; c && strcmp( c->title, room ) != 0; c = c->next );
     882        struct groupchat *c = bee_chat_by_title( ic->bee, ic, room );
    885883       
    886884        if( c )
Note: See TracChangeset for help on using the changeset viewer.