Changeset 83e92bf for irc_channel.c


Ignore:
Timestamp:
2010-03-27T12:30:00Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
9b69eb7
Parents:
b95932e
Message:

Topic handling changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    rb95932e r83e92bf  
    109109}
    110110
    111 int irc_channel_set_topic( irc_channel_t *ic, const char *topic )
     111int irc_channel_set_topic( irc_channel_t *ic, const char *topic, const irc_user_t *iu )
    112112{
    113113        g_free( ic->topic );
    114114        ic->topic = g_strdup( topic );
    115115       
     116        g_free( ic->topic_who );
     117        if( iu )
     118                ic->topic_who = g_strdup_printf( "%s!%s@%s", iu->nick, iu->user, iu->host );
     119        else
     120                ic->topic_who = NULL;
     121       
     122        ic->topic_time = time( NULL );
     123       
    116124        if( ic->flags & IRC_CHANNEL_JOINED )
    117                 irc_send_topic( ic );
     125                irc_send_topic( ic, TRUE );
    118126       
    119127        return 1;
Note: See TracChangeset for help on using the changeset viewer.