aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/irc.c b/irc.c
index a716fe9e..60fe77f8 100644
--- a/irc.c
+++ b/irc.c
@@ -930,19 +930,31 @@ void irc_vawrite( irc_t *irc, char *format, va_list params )
return;
}
-void irc_write_all( char *format, ... )
+void irc_write_all( int now, char *format, ... )
{
va_list params;
GSList *temp;
-
+
va_start( params, format );
-
+
temp = irc_connection_list;
- while( temp!=NULL ) {
+ while( temp != NULL )
+ {
+ irc_t *irc = temp->data;
+
+ if( now )
+ {
+ g_free( irc->sendbuffer );
+ irc->sendbuffer = g_strdup( "\r\n" );
+ }
irc_vawrite( temp->data, format, params );
+ if( now )
+ {
+ bitlbee_io_current_client_write( irc->io_channel, G_IO_OUT, irc );
+ }
temp = temp->next;
}
-
+
va_end( params );
return;
}