aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-01-19 18:07:47 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2006-01-19 18:07:47 +0100
commitbd9b00f4fed3560eab98f15cf9923aed13467d5d (patch)
treecad1a8227670a97c68463006c15d43539824f18f /irc.c
parent2face6292c693afb45e5e04f87ba080931eb16c3 (diff)
Fixes for single-process daemon mode, changed value of USTATUS_SHUTDOWN. If
this still causes problems, shutting down should be an extra flag instead of a status code.
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/irc.c b/irc.c
index aedbbc83..2f2937cc 100644
--- a/irc.c
+++ b/irc.c
@@ -187,6 +187,8 @@ void irc_free(irc_t * irc)
if( storage_save( irc, TRUE ) != STORAGE_OK )
irc_usermsg( irc, "Error while saving settings!" );
+ closesocket( irc->fd );
+
if( irc->ping_source_id > 0 )
g_source_remove( irc->ping_source_id );
g_source_remove( irc->r_watch_source_id );
@@ -693,7 +695,7 @@ void irc_login( irc_t *irc )
irc_usermsg( irc, "Welcome to the BitlBee gateway!\n\nIf you've never used BitlBee before, please do read the help information using the \x02help\x02 command. Lots of FAQ's are answered there." );
- if( global.conf->runmode == RUNMODE_FORKDAEMON )
+ if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON )
ipc_to_master_str( "CLIENT %s %s :%s\r\n", irc->host, irc->nick, irc->realname );
irc->status = USTATUS_LOGGED_IN;