Changeset a97a336 for irc_im.c


Ignore:
Timestamp:
2010-12-07T23:14:30Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
83f1bd1d
Parents:
d76e12f
Message:

Add CTCP HELP code. Also cleaning up some noop handlers in the Twitter
module (chat_with and send_typing) that suggested support for features
that obviously don't exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    rd76e12f ra97a336  
    513513                }
    514514        }
     515        else if( g_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu )
     516        {
     517                GString *supp = g_string_new( "Supported CTCPs:" );
     518                GList *l;
     519               
     520                if( iu->bu->ic && iu->bu->ic->acc->prpl->transfer_request )
     521                        g_string_append( supp, " DCC SEND," );
     522                if( iu->bu->ic && iu->bu->ic->acc->prpl->send_typing )
     523                        g_string_append( supp, " TYPING," );
     524                if( iu->bu->ic->acc->prpl->buddy_action_list )
     525                        for( l = iu->bu->ic->acc->prpl->buddy_action_list( iu->bu ); l; l = l->next )
     526                        {
     527                                struct buddy_action *ba = l->data;
     528                                g_string_append_printf( supp, " %s (%s),",
     529                                                        ba->name, ba->description );
     530                        }
     531                g_string_truncate( supp, supp->len - 1 );
     532                irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001HELP %s\001", supp->str );
     533                g_string_free( supp, TRUE );
     534        }
    515535        else if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->buddy_action )
    516536        {
Note: See TracChangeset for help on using the changeset viewer.