Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rdf1fb67 rbdda9e9  
    658658                }
    659659        }
    660         else if( ( c = chat_by_channel( channel ) ) )
     660        else if( ( c = irc_chat_by_channel( irc, channel ) ) )
    661661        {
    662662                GList *l;
     
    811811        else
    812812        {
    813                 struct groupchat *c = chat_by_channel( channel );
     813                struct groupchat *c = irc_chat_by_channel( irc, channel );
    814814               
    815815                if( c )
     
    949949        if( *nick == '#' || *nick == '&' )
    950950        {
    951                 if( !( c = chat_by_channel( nick ) ) )
     951                if( !( c = irc_chat_by_channel( irc, nick ) ) )
    952952                {
    953953                        irc_reply( irc, 403, "%s :Channel does not exist", nick );
     
    12151215        return TRUE;
    12161216}
     1217
     1218struct groupchat *irc_chat_by_channel( irc_t *irc, char *channel )
     1219{
     1220        struct groupchat *c;
     1221        account_t *a;
     1222       
     1223        /* This finds the connection which has a conversation which belongs to this channel */
     1224        for( a = irc->accounts; a; a = a->next )
     1225        {
     1226                if( a->ic == NULL )
     1227                        continue;
     1228               
     1229                c = a->ic->groupchats;
     1230                while( c )
     1231                {
     1232                        if( c->channel && g_strcasecmp( c->channel, channel ) == 0 )
     1233                                return c;
     1234                       
     1235                        c = c->next;
     1236                }
     1237        }
     1238       
     1239        return NULL;
     1240}
Note: See TracChangeset for help on using the changeset viewer.