diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/nogaim.c | 18 | ||||
| -rw-r--r-- | protocols/nogaim.h | 2 | 
2 files changed, 20 insertions, 0 deletions
| diff --git a/protocols/nogaim.c b/protocols/nogaim.c index cfdaa454..3ce15166 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -785,6 +785,24 @@ void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, t  	g_free( wrapped );  } +void imcb_chat_log( struct groupchat *c, char *format, ... ) +{ +	irc_t *irc = c->ic->irc; +	va_list params; +	char *text; +	user_t *u; +	 +	va_start( params, format ); +	text = g_strdup_vprintf( format, params ); +	va_end( params ); +	 +	u = user_find( irc, irc->mynick ); +	 +	irc_privmsg( irc, u, "PRIVMSG", c->channel, "System message: ", text ); +	 +	g_free( text ); +} +  void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at )  {  	struct im_connection *ic = c->ic; diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 8ba8fd9e..7d391edd 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -299,6 +299,8 @@ G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, char *handle );  G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );  /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */  G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at ); +/* System messages specific to a groupchat, so they can be displayed in the right context. */ +G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );  /* To tell BitlBee 'who' changed the topic of 'c' to 'topic'. */  G_MODULE_EXPORT void imcb_chat_topic( struct groupchat *c, char *who, char *topic, time_t set_at );  G_MODULE_EXPORT void imcb_chat_free( struct groupchat *c ); | 
