Changeset d88c92a for irc_im.c


Ignore:
Timestamp:
2010-12-06T00:03:49Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d76e12f
Parents:
a429907
Message:

First bits of CTCP support to contacts. (Try /CTCP VERSION on a Jabber
contact.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    ra429907 rd88c92a  
    276276        else
    277277                return FALSE;
     278       
     279        return TRUE;
     280}
     281
     282static gboolean bee_irc_user_action_response( bee_t *bee, bee_user_t *bu, const char *action, char * const args[], void *data )
     283{
     284        irc_t *irc = (irc_t *) bee->ui_data;
     285        GString *msg = g_string_new( "\001" );
     286       
     287        g_string_append( msg, action );
     288        while( *args )
     289        {
     290                if( strchr( *args, ' ' ) )
     291                        g_string_append_printf( msg, " \"%s\"", *args );
     292                else
     293                        g_string_append_printf( msg, " %s", *args );
     294                args ++;
     295        }
     296        g_string_append_c( msg, '\001' );
     297       
     298        irc_send_msg( (irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL );
    278299       
    279300        return TRUE;
     
    492513                }
    493514        }
     515        else if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->buddy_action )
     516        {
     517                iu->bu->ic->acc->prpl->buddy_action( iu->bu, ctcp[0], ctcp + 1, NULL );
     518        }
    494519       
    495520        return FALSE;
     
    10411066        bee_irc_user_msg,
    10421067        bee_irc_user_typing,
     1068        bee_irc_user_action_response,
    10431069       
    10441070        bee_irc_chat_new,
Note: See TracChangeset for help on using the changeset viewer.