aboutsummaryrefslogtreecommitdiffstats
path: root/irc.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-29 21:30:47 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-29 21:30:47 +0200
commitb9256662a7ef5660b35ba51bdc8d798befb871f0 (patch)
tree416e239ccc7e09f8595a62eafd444748529938bb /irc.c
parent1521a85744f1e5a92dff584c861d6da249b86b95 (diff)
Show a friendly warning message when running in inetd mode on the command
line (if stdin is a TTY). This hopefully answers a FAQ. Also moved stuff around in README a little bit, daemon mode should be described before obsolete inetd stuff.
Diffstat (limited to 'irc.c')
-rw-r--r--irc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/irc.c b/irc.c
index 26ec8012..cbbd21a3 100644
--- a/irc.c
+++ b/irc.c
@@ -146,6 +146,12 @@ irc_t *irc_new( int fd )
set_eval_charset( set_find( &b->set, "charset" ), set_getstr( &b->set, "charset" ) );
irc_write( irc, ":%s NOTICE AUTH :%s", irc->root->host, "BitlBee-IRCd initialized, please go on" );
+ if( isatty( irc->fd ) )
+ irc_write( irc, ":%s NOTICE AUTH :%s", irc->root->host,
+ "If you read this, you most likely accidentally "
+ "started BitlBee in inetd mode on the command line. "
+ "You probably want to run it in (Fork)Daemon mode. "
+ "See doc/README for more information." );
g_free( myhost );
g_free( host );