Changeset 31e5846


Ignore:
Timestamp:
2008-01-20T00:17:57Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
a882d6c
Parents:
0adce21
Message:

Added imcb_chat_log() for chatroom system messages, so they can be
displayed inside the right channel.

Location:
protocols
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r0adce21 r31e5846  
    784784        }
    785785        g_free( wrapped );
     786}
     787
     788void imcb_chat_log( struct groupchat *c, char *format, ... )
     789{
     790        irc_t *irc = c->ic->irc;
     791        va_list params;
     792        char *text;
     793        user_t *u;
     794       
     795        va_start( params, format );
     796        text = g_strdup_vprintf( format, params );
     797        va_end( params );
     798       
     799        u = user_find( irc, irc->mynick );
     800       
     801        irc_privmsg( irc, u, "PRIVMSG", c->channel, "System message: ", text );
     802       
     803        g_free( text );
    786804}
    787805
  • protocols/nogaim.h

    r0adce21 r31e5846  
    300300/* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */
    301301G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at );
     302/* System messages specific to a groupchat, so they can be displayed in the right context. */
     303G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
    302304/* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */
    303305G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at );
Note: See TracChangeset for help on using the changeset viewer.