Index: Makefile
===================================================================
--- Makefile	(revision 903a2fcc60f82f52fe05c79250e6875dc48f23f0)
+++ Makefile	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -85,8 +85,10 @@
 	mkdir -p $(DESTDIR)$(ETCDIR)
 	install -m 0644 motd.txt $(DESTDIR)$(ETCDIR)/motd.txt
+	install -m 0644 welcome.txt $(DESTDIR)$(ETCDIR)/welcome.txt
 	install -m 0644 bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf
 
 uninstall-etc:
 	rm -f $(DESTDIR)$(ETCDIR)/motd.txt
+	rm -f $(DESTDIR)$(ETCDIR)/welcome.txt
 	rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf
 	-rmdir $(DESTDIR)$(ETCDIR)
Index: bitlbee.conf
===================================================================
--- bitlbee.conf	(revision 903a2fcc60f82f52fe05c79250e6875dc48f23f0)
+++ bitlbee.conf	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -73,4 +73,11 @@
 # MotdFile = /etc/bitlbee/motd.txt
 
+## WelcomeFile
+##
+## Specify an alternative file for the welcome message displayed when joining the
+## control channel. Default value depends on the --etcdir argument to configure.
+##
+# WelcomeFile = /etc/bitlbee/welcome.txt
+
 ## ConfigDir
 ##
Index: conf.c
===================================================================
--- conf.c	(revision 903a2fcc60f82f52fe05c79250e6875dc48f23f0)
+++ conf.c	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -61,4 +61,5 @@
 	conf->pidfile = g_strdup( PIDFILE );
 	conf->motdfile = g_strdup( ETCDIR "/motd.txt" );
+	conf->welcomefile = g_strdup( ETCDIR "/welcome.txt" );
 	conf->ping_interval = 180;
 	conf->ping_timeout = 300;
@@ -240,4 +241,9 @@
 				g_free( conf->motdfile );
 				conf->motdfile = g_strdup( ini->value );
+			}
+			else if( g_strcasecmp( ini->key, "welcomefile" ) == 0 )
+			{
+				g_free( conf->welcomefile );
+				conf->welcomefile = g_strdup( ini->value );
 			}
 			else if( g_strcasecmp( ini->key, "account_storage" ) == 0 )
Index: conf.h
===================================================================
--- conf.h	(revision 903a2fcc60f82f52fe05c79250e6875dc48f23f0)
+++ conf.h	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -45,4 +45,5 @@
 	char *pidfile;
 	char *motdfile;
+	char *welcomefile;
 	char *primary_storage;
 	char **migrate_storage;
Index: irc.c
===================================================================
--- irc.c	(revision 903a2fcc60f82f52fe05c79250e6875dc48f23f0)
+++ irc.c	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -32,4 +32,5 @@
 
 static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond );
+static void irc_welcome( irc_t *irc );
 
 GSList *irc_connection_list = NULL;
@@ -787,8 +788,5 @@
 	irc_spawn( irc, u );
 	
-	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 FAQs are answered there." );
-	#ifdef WITH_OTR
-	irc_usermsg( irc, "\nOTR users please note: Private key files are owned by the user BitlBee is running as." );
-	#endif
+	irc_welcome( irc );
 	
 	if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON )
@@ -796,4 +794,26 @@
 	
 	irc->status |= USTATUS_LOGGED_IN;
+}
+
+static void irc_welcome( irc_t *irc )
+{
+	FILE *f;
+	
+	f = fopen( global.conf->welcomefile, "r" );
+	if( !f )
+	{
+		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 FAQs are answered there.\n\nOTR users please note: Private key files are owned by the user BitlBee is running as." );
+	}
+	else
+	{
+		char linebuf[380];
+		
+		while( fgets( linebuf, 380, f ) )
+		{
+			irc_usermsg( irc, linebuf );
+		}
+		
+		fclose( f );
+	}
 }
 
Index: welcome.txt
===================================================================
--- welcome.txt	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
+++ welcome.txt	(revision 896195002cc903ec4b1ef7e1468f73c1dc08df9e)
@@ -0,0 +1,5 @@
+Welcome to the BitlBee gateway!
+
+If you've never used BitlBee before, please do read the help information using the help command. Lots of FAQs are answered there.
+
+OTR users please note: Private key files are owned by the user BitlBee is running as.
