aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2014-11-26 02:25:00 -0300
committerdequis <dx@dxzone.com.ar>2014-11-26 02:25:00 -0300
commit6f6725c5bbec31d1b9f6937f229f140828e50e45 (patch)
tree77dabd332ef8422caed83d93680576a9cf76c158
parent9f8bb178049eaa02023037d40b87d8b6f824477a (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)
-rw-r--r--bitlbee.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 93754d05..ca783cf6 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -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();