Changeset 8961950
- Timestamp:
- 2008-02-16T16:25:24Z (17 years ago)
- Branches:
- master
- Children:
- 4eb4c0f
- Parents:
- 903a2fc
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r903a2fc r8961950 85 85 mkdir -p $(DESTDIR)$(ETCDIR) 86 86 install -m 0644 motd.txt $(DESTDIR)$(ETCDIR)/motd.txt 87 install -m 0644 welcome.txt $(DESTDIR)$(ETCDIR)/welcome.txt 87 88 install -m 0644 bitlbee.conf $(DESTDIR)$(ETCDIR)/bitlbee.conf 88 89 89 90 uninstall-etc: 90 91 rm -f $(DESTDIR)$(ETCDIR)/motd.txt 92 rm -f $(DESTDIR)$(ETCDIR)/welcome.txt 91 93 rm -f $(DESTDIR)$(ETCDIR)/bitlbee.conf 92 94 -rmdir $(DESTDIR)$(ETCDIR) -
bitlbee.conf
r903a2fc r8961950 73 73 # MotdFile = /etc/bitlbee/motd.txt 74 74 75 ## WelcomeFile 76 ## 77 ## Specify an alternative file for the welcome message displayed when joining the 78 ## control channel. Default value depends on the --etcdir argument to configure. 79 ## 80 # WelcomeFile = /etc/bitlbee/welcome.txt 81 75 82 ## ConfigDir 76 83 ## -
conf.c
r903a2fc r8961950 61 61 conf->pidfile = g_strdup( PIDFILE ); 62 62 conf->motdfile = g_strdup( ETCDIR "/motd.txt" ); 63 conf->welcomefile = g_strdup( ETCDIR "/welcome.txt" ); 63 64 conf->ping_interval = 180; 64 65 conf->ping_timeout = 300; … … 240 241 g_free( conf->motdfile ); 241 242 conf->motdfile = g_strdup( ini->value ); 243 } 244 else if( g_strcasecmp( ini->key, "welcomefile" ) == 0 ) 245 { 246 g_free( conf->welcomefile ); 247 conf->welcomefile = g_strdup( ini->value ); 242 248 } 243 249 else if( g_strcasecmp( ini->key, "account_storage" ) == 0 ) -
conf.h
r903a2fc r8961950 45 45 char *pidfile; 46 46 char *motdfile; 47 char *welcomefile; 47 48 char *primary_storage; 48 49 char **migrate_storage; -
irc.c
r903a2fc r8961950 32 32 33 33 static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond ); 34 static void irc_welcome( irc_t *irc ); 34 35 35 36 GSList *irc_connection_list = NULL; … … 787 788 irc_spawn( irc, u ); 788 789 789 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." ); 790 #ifdef WITH_OTR 791 irc_usermsg( irc, "\nOTR users please note: Private key files are owned by the user BitlBee is running as." ); 792 #endif 790 irc_welcome( irc ); 793 791 794 792 if( global.conf->runmode == RUNMODE_FORKDAEMON || global.conf->runmode == RUNMODE_DAEMON ) … … 796 794 797 795 irc->status |= USTATUS_LOGGED_IN; 796 } 797 798 static void irc_welcome( irc_t *irc ) 799 { 800 FILE *f; 801 802 f = fopen( global.conf->welcomefile, "r" ); 803 if( !f ) 804 { 805 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." ); 806 } 807 else 808 { 809 char linebuf[380]; 810 811 while( fgets( linebuf, 380, f ) ) 812 { 813 irc_usermsg( irc, linebuf ); 814 } 815 816 fclose( f ); 817 } 798 818 } 799 819
Note: See TracChangeset
for help on using the changeset viewer.