aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2008-06-29 10:35:41 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2008-06-29 10:35:41 +0100
commit565a1eaa8b36ca64a7806e6ad74a9a26495c0c6e (patch)
treec6d404b6600b4e10b7b0d5bd4d4c185f4954e4ac /irc.c
parente0f9170849e9c4aaa679f86703a60686d36607bb (diff)
Added the DEAF command, which makes the daemon stop listening for new
connections. This makes it easier to upgrade a BitlBee without having to disconnect all current users immediately. Closes #428.
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/irc.c b/irc.c
index a6220140..b98f7048 100644
--- a/irc.c
+++ b/irc.c
@@ -313,7 +313,11 @@ void irc_free( irc_t * irc )
g_free( irc );
- if( global.conf->runmode == RUNMODE_INETD || global.conf->runmode == RUNMODE_FORKDAEMON )
+ if( global.conf->runmode == RUNMODE_INETD ||
+ global.conf->runmode == RUNMODE_FORKDAEMON ||
+ ( global.conf->runmode == RUNMODE_DAEMON &&
+ global.listen_socket == -1 &&
+ irc_connection_list == NULL ) )
b_main_quit();
}