Changeset a87754b for irc_im.c


Ignore:
Timestamp:
2010-05-08T01:02:12Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
bfb99ee
Parents:
e4816ea
Message:

Restored support for outgoing messages. This code is all so much saner now..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    re4816ea ra87754b  
    252252
    253253/* IM->IRC: Groupchats */
    254 gboolean bee_irc_chat_new( bee_t *bee, struct groupchat *c )
     254static const struct irc_channel_funcs irc_channel_im_chat_funcs;
     255
     256static gboolean bee_irc_chat_new( bee_t *bee, struct groupchat *c )
    255257{
    256258        irc_t *irc = bee->ui_data;
     
    272274        c->ui_data = ic;
    273275        ic->data = c;
     276        ic->f = &irc_channel_im_chat_funcs;
    274277       
    275278        topic = g_strdup_printf( "BitlBee groupchat: \"%s\". Please keep in mind that root-commands won't work here. Have fun!", c->title );
     
    280283}
    281284
    282 gboolean bee_irc_chat_free( bee_t *bee, struct groupchat *c )
     285static gboolean bee_irc_chat_free( bee_t *bee, struct groupchat *c )
    283286{
    284287        irc_channel_t *ic = c->ui_data;
     
    292295}
    293296
    294 gboolean bee_irc_chat_log( bee_t *bee, struct groupchat *c, const char *text )
     297static gboolean bee_irc_chat_log( bee_t *bee, struct groupchat *c, const char *text )
    295298{
    296299        irc_channel_t *ic = c->ui_data;
     
    301304}
    302305
    303 gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at )
     306static gboolean bee_irc_chat_msg( bee_t *bee, struct groupchat *c, bee_user_t *bu, const char *msg, time_t sent_at )
    304307{
    305308        irc_t *irc = bee->ui_data;
     
    317320}
    318321
    319 gboolean bee_irc_chat_add_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )
     322static gboolean bee_irc_chat_add_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )
    320323{
    321324        irc_t *irc = bee->ui_data;
     
    326329}
    327330
    328 gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )
     331static gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )
    329332{
    330333        irc_t *irc = bee->ui_data;
     
    334337        return TRUE;
    335338}
     339
     340/* IRC->IM */
     341
     342static gboolean bee_irc_channel_chat_privmsg( irc_channel_t *ic, const char *msg )
     343{
     344        struct groupchat *c = ic->data;
     345       
     346        bee_chat_msg( ic->irc->b, c, msg, 0 );
     347       
     348        return TRUE;
     349       
     350}
     351
     352static const struct irc_channel_funcs irc_channel_im_chat_funcs = {
     353        bee_irc_channel_chat_privmsg,
     354};
    336355
    337356
     
    342361}
    343362
    344 gboolean bee_irc_ft_out_start( struct im_connection *ic, file_transfer_t *ft )
     363static gboolean bee_irc_ft_out_start( struct im_connection *ic, file_transfer_t *ft )
    345364{
    346365        return dccs_recv_start( ft );
    347366}
    348367
    349 void bee_irc_ft_close( struct im_connection *ic, file_transfer_t *ft )
     368static void bee_irc_ft_close( struct im_connection *ic, file_transfer_t *ft )
    350369{
    351370        return dcc_close( ft );
    352371}
    353372
    354 void bee_irc_ft_finished( struct im_connection *ic, file_transfer_t *file )
     373static void bee_irc_ft_finished( struct im_connection *ic, file_transfer_t *file )
    355374{
    356375        dcc_file_transfer_t *df = file->priv;
Note: See TracChangeset for help on using the changeset viewer.