Changeset 50e1776 for irc.c


Ignore:
Timestamp:
2007-11-19T22:23:58Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
ef5c185
Parents:
ebb95b6
Message:

Merging /TOPIC code from Miklos Vajna. Untested, because I still have to
implement the Jabber hooks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    rebb95b6 r50e1776  
    788788void irc_topic( irc_t *irc, char *channel )
    789789{
    790         if( g_strcasecmp( channel, irc->channel ) == 0 )
    791         {
     790        struct groupchat *c = irc_chat_by_channel( irc, channel );
     791       
     792        if( c && c->topic )
     793                irc_reply( irc, 332, "%s :%s", channel, c->topic );
     794        else if( g_strcasecmp( channel, irc->channel ) == 0 )
    792795                irc_reply( irc, 332, "%s :%s", channel, CONTROL_TOPIC );
    793         }
    794796        else
    795         {
    796                 struct groupchat *c = irc_chat_by_channel( irc, channel );
    797                
    798                 if( c )
    799                         irc_reply( irc, 332, "%s :BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", channel, c->title );
    800                 else
    801                         irc_reply( irc, 331, "%s :No topic for this channel", channel );
    802         }
     797                irc_reply( irc, 331, "%s :No topic for this channel", channel );
    803798}
    804799
Note: See TracChangeset for help on using the changeset viewer.