Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_commands.c

    r6bbb939 r50e1776  
    144144                irc_join( irc, u, irc->channel );
    145145        }
    146         else if( ( c = chat_by_channel( cmd[1] ) ) )
     146        else if( ( c = irc_chat_by_channel( irc, cmd[1] ) ) )
    147147        {
    148148                user_t *u = user_find( irc, irc->nick );
     
    201201{
    202202        char *nick = cmd[1], *channel = cmd[2];
    203         struct groupchat *c = chat_by_channel( channel );
     203        struct groupchat *c = irc_chat_by_channel( irc, channel );
    204204        user_t *u = user_find( irc, nick );
    205205       
     
    287287                        u = u->next;
    288288                }
    289         else if( ( c = chat_by_channel( channel ) ) )
     289        else if( ( c = irc_chat_by_channel( irc, channel ) ) )
    290290                for( l = c->in_room; l; l = l->next )
    291291                {
     
    421421static void irc_cmd_topic( irc_t *irc, char **cmd )
    422422{
    423         if( cmd[2] )
    424                 irc_reply( irc, 482, "%s :Cannot change topic", cmd[1] );
    425         else
    426                 irc_topic( irc, cmd[1] );
     423        char *channel = cmd[1];
     424        char *topic = cmd[2];
     425       
     426        if( topic )
     427        {
     428                /* Send the topic */
     429                struct groupchat *c = irc_chat_by_channel( irc, channel );
     430                if( c && c->ic && c->ic->acc->prpl->chat_topic )
     431                        c->ic->acc->prpl->chat_topic( c, topic );
     432        }
     433        else
     434        {
     435                /* Get the topic */
     436                irc_topic( irc, channel );
     437        }
    427438}
    428439
Note: See TracChangeset for help on using the changeset viewer.