Changeset 6d5eb72


Ignore:
Timestamp:
2008-12-14T01:14:55Z (16 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e1720ce
Parents:
549545b
Message:

Added more chat.c sanity checks that were (embarassingly) missing so far.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chat.c

    r549545b r6d5eb72  
    3131        set_t *s;
    3232
    33         if( acc->prpl->chat_join == NULL )
     33        if( acc->prpl->chat_join == NULL || !chat_chanok( channel ) ||
     34            chat_chancmp( channel, irc->channel ) == 0 )
     35        {
    3436                return NULL;
    35        
    36         if( !chat_chanok( channel ) )
    37                 return NULL;
    38        
    39         if( chat_chancmp( channel, irc->channel ) == 0 )
    40                 return NULL;
     37        }
    4138       
    4239        for( c = irc->chatrooms; c; c = c->next )
     
    177174        struct groupchat *gc;
    178175        char *nick = set_getstr( &c->set, "nick" );
     176
     177        if( c->acc->ic == NULL || c->acc->prpl->chat_join == NULL )
     178                return 0;
    179179       
    180180        if( nick == NULL )
    181181                nick = irc->nick;
    182182       
    183         if( c->acc->prpl->chat_join &&
    184             ( gc = c->acc->prpl->chat_join( c->acc->ic, c->handle, nick, password ) ) )
     183        if( ( gc = c->acc->prpl->chat_join( c->acc->ic, c->handle, nick, password ) ) )
    185184        {
    186185                g_free( gc->channel );
Note: See TracChangeset for help on using the changeset viewer.