diff options
author | dequis <dx@dxzone.com.ar> | 2014-11-26 02:25:00 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2014-11-26 02:25:00 -0300 |
commit | 6f6725c5bbec31d1b9f6937f229f140828e50e45 (patch) | |
tree | 77dabd332ef8422caed83d93680576a9cf76c158 /bitlbee.c | |
parent | 9f8bb178049eaa02023037d40b87d8b6f824477a (diff) |
Use irc_write_all() to send the message in bitlbee_shutdown
This ensures that the message arrives by using the "now" parameter of
irc_write_all(), because in my testing it didn't show up (even though
surrounding it with printf() worked, in inetd mode)
Diffstat (limited to 'bitlbee.c')
-rw-r--r-- | bitlbee.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -361,10 +361,12 @@ static gboolean bitlbee_io_new_client( gpointer data, gint fd, b_input_condition gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond ) { + /* Send the message here with now=TRUE to ensure it arrives */ + irc_write_all( TRUE, "ERROR :Closing link: BitlBee server shutting down" ); + /* Try to save data for all active connections (if desired). */ while( irc_connection_list != NULL ) - irc_abort( irc_connection_list->data, TRUE, - "BitlBee server shutting down" ); + irc_abort( irc_connection_list->data, TRUE, NULL ); /* We'll only reach this point when not running in inetd mode: */ b_main_quit(); |