3 # By Carlo Wood (carlo@runaway.xs4all.nl)
5 # For a description of the syntax of this configuration file,
6 # see the config/Configure script.
8 # TO CONFIGURE THE SERVER, TYPE: 'make config' in the top level directory !
11 #### Start of system configuration section. ####
14 exec_prefix=@exec_prefix@
18 CFLAGS_DEFAULT="@CFLAGS@"
19 CPPFLAGS_DEFAULT="@CPPFLAGS@"
20 LDFLAGS_DEFAULT="@LDFLAGS@"
22 ac_cv_header_poll_h=@ac_cv_header_poll_h@
23 unet_cv_func_poll_syscall=@unet_cv_func_poll_syscall@
24 ac_cv_header_syslog_h=@ac_cv_header_syslog_h@
26 #### End of system configuration section. ####
28 if [ -z "$CONFIG_BATCH" ]; then
29 echo "**************************************************************************"
30 echo "Error: Please run 'make config' that resides in the top level directory!"
31 echo "**************************************************************************"
35 mainmenu_name "Undernet IRC Daemon Configuration"
36 mainmenu_option next_comment
37 if [ "$CONFIG_BATCH" = "n" ]; then
38 echo "* Welcome to the Undernet IRC Daemon Configuration script."
39 echo "* You can restart this configuration at any time by typing 'make config'."
40 echo "* If you need help with your decision on any question, type a '?'"
47 if [ "$DEFAULTS" != "none" ]; then
48 bool 'Do you want to change your previous configuration' CHANGE_CONFIG
49 if [ "$CHANGE_CONFIG" = "n" ]; then
50 echo "Ok, I will only prompt you for NEW parameters."
60 mainmenu_option next_comment
61 comment 'Debugging (do not define this on production servers)'
62 bool 'Do you want to enable debugging output' DEBUGMODE
63 bool 'Do you want to enable asserts and memory allocation checking' CONFIG_NDEBUG
65 if [ "$CONFIG_NDEBUG" = "n" ]; then
66 if [ -z "$EXTRA_CPPFLAGS" ]; then
67 EXTRA_CPPFLAGS="-DNDEBUG"
69 EXTRA_CPPFLAGS="-DNDEBUG $EXTRA_CPPFLAGS"
72 bool 'Are you testing on a host without DNS' NODNS
75 mainmenu_option next_comment
76 comment 'Compile stuff'
77 if [ "$prefix" = "NONE" ]; then
80 if [ "$exec_prefix" = "NONE" ]; then
81 eval exec_prefix="$prefix"
83 string 'Which compiler do you want to use' CC "$CC_DEFAULT"
84 echo "* For the following four questions, specify 'none' when you want it to be empty."
85 if [ -z "$cflags_O3_remark" -a -n "$CFLAGS" ]; then
86 CFLAGS_DEFAULT=`echo "$CFLAGS" | sed -e 's%-O2%-O3%'`
87 if [ "$CFLAGS_DEFAULT" != "$CFLAGS" ]; then
88 echo "You are highly advised to use -O3 instead of -O2 if you're short in cpu cycles!"
89 echo "Please read documentation (press '?'):"
93 eval string "'What flags should I pass to $CC [none]'" CFLAGS "'$CFLAGS_DEFAULT'"
94 define_macro cflags_O3_remark done
95 string 'Do you need extra include directories [none]' EXTRA_INCLUDEDIRS none
96 if [ -z "$LDFLAGS_DEFAULT" ]; then
99 eval LDFLAGS_DEFAULT="$LDFLAGS_DEFAULT"
101 string 'Which linker flags do you need [none]' LDFLAGS "$LDFLAGS_DEFAULT"
102 if [ -z "$LIBS" ]; then
105 string 'Which extra libraries do you need [none]' IRCDLIBS "$LIBS"
106 eval bindir="$bindir"
107 string 'In which directory should I install the ircd binary' BINDIR $bindir
108 if [ ! -d "$BINDIR" ]; then
109 echo "$BINDIR : No such directory"
111 string 'What should the name of the installed symbolic link to the exectuable be' SYMLINK ircd
112 string 'Which permissions do you want the binary to have' IRCDMODE 711
113 string 'Which owner do you want the binary to have' IRCDOWN "`id | sed -e 's/.*uid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
114 string 'Which group do you want the binary to have' IRCDGRP "`id | sed -e 's/.*gid=[0-9]*(//' -e 's/).*//' 2> /dev/null`"
116 string 'Where should I install the man page' MANDIR $mandir
117 if [ "$CFLAGS" = "none" ]; then
120 if [ "$EXTRA_INCLUDEDIRS" = "none" ]; then
123 if [ "$LDFLAGS" = "none" ]; then
126 if [ "$IRCDLIBS" = "none" ]; then
129 if [ -n "$EXTRA_INCLUDEDIRS" ]; then
130 for i in $EXTRA_INCLUDEDIRS; do
131 if [ -z "$EXTRA_CPPFLAGS" ]; then
134 EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I$i"
138 if [ -z "$EXTRA_CPPFLAGS" ]; then
139 CPPFLAGS="-I../include -I../config"
141 CPPFLAGS="-I../include -I../config $EXTRA_CPPFLAGS"
143 echo "EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >>$CONFIG
144 echo "CPPFLAGS=\"$CPPFLAGS\"" >>$CONFIG
145 bool 'Use inlining for a few crucial functions' FORCEINLINE y
148 if [ "$ac_cv_header_poll_h" = "yes" ]; then
149 if [ "$unet_cv_func_poll_syscall" = "yes" ]; then
150 define_bool USE_POLL y
152 mainmenu_option next_comment
153 comment 'Operating System specific defines.'
154 bool 'You have poll(), but do you want to use it' USE_POLL n
159 mainmenu_option next_comment
160 comment 'Host specific defines'
161 if [ -f /etc/resolv.conf ]; then
162 DOMAINNAME_DEFAULT="`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`"
164 string 'What is the domain name of your network' DOMAINNAME $DOMAINNAME_DEFAULT
165 if [ -z "$DOMAINNAME" ]; then
168 string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
169 bool 'Does your host have a reliable clock' RELIABLE_CLOCK
172 mainmenu_option next_comment
173 comment 'General defines'
174 bool 'Do you want the daemon set its own uid/gid (say yes for chroot!)' CONFIG_SETUGID
175 if [ "$CONFIG_SETUGID" = "y" ]; then
176 int ' UID of irc daemon' IRC_UID
177 int ' GID of irc daemon' IRC_GID
178 bool ' Change root ('/') after start of daemon' CHROOTDIR
180 define_bool CHROOTDIR n
181 define_int IRC_UID $IRC_UID
182 define_int IRC_GID $IRC_GID
183 bool 'Allow to specify configuration file on command line' CMDLINE_CONFIG
184 if [ "$CMDLINE_CONFIG" = "y" ]; then
185 echo " SECURITY: Then don't install the daemon SUID or SGID !"
188 bool 'Do you need virtual hosting' VIRTUAL_HOST
190 bool 'Will you connect to more then one server at a time' HUB
191 if [ "$PREV_HUB" != "$HUB" ]; then
197 mainmenu_option next_comment
198 comment 'Paths and files'
199 eval DPATH_DEFAULT="${prefix}/lib/ircd"
200 string 'Directory where all ircd stuff resides' DPATH $DPATH_DEFAULT
201 if [ "$CHROOTDIR" = "y" ] ; then
202 define_string SPATH "/$SYMLINK"
204 define_string SPATH "$BINDIR/$SYMLINK"
206 echo "The following filenames are either full paths or files within DPATH"
207 string 'Server configuration file' CPATH 'ircd.conf'
208 string 'Server MOTD file' MPATH 'ircd.motd'
209 string 'Server remote MOTD file (3 lines max)' RPATH 'remote.motd'
210 if [ "$DEBUGMODE" = "y" ]; then
211 string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
213 define_string LPATH "$LPATH"
215 string 'File for server pid' PPATH 'ircd.pid'
218 mainmenu_option next_comment
219 comment 'Logging (filenames are either full paths or files within DPATH)'
220 bool 'Do you want to log the use of /WHO x% (recommended)' CONFIG_LOG_WHOX y
221 if [ "$CONFIG_LOG_WHOX" = "y" ]; then
222 string ' Give the path and(or) filename of this log file' WPATH 'whox.log'
225 comment 'Bad Channel G-Lines allow operators to add channel masks to a list which prohibits local clients from being able joining channels which match the mask. Remote BadChan Glines allow Uworld to add or remove channels from the servers internal list of badchans'
227 bool 'Do you want to enable Bad Channel G-lines' BADCHAN y
228 if [ "$BADCHAN" = "y" ]; then
230 echo " WARNING DO _NOT_ USE LOCAL BADCHANNEL GLINES ON UNDERNET"
231 echo " Use of LOCAL BAD Channel G-Lines can be cause for REMOVAL"
232 bool 'Allow LOCAL BAD Channel G-lines' LOCAL_BADCHAN
235 bool 'Do you want to log G-lines to a separate file' CONFIG_LOG_GLINES
236 if [ "$CONFIG_LOG_GLINES" = "y" ]; then
237 string ' Give the path and(or) filename of this log file' GPATH 'gline.log'
239 bool 'Do you want to log JUPEs to a separate file' CONFIG_LOG_JUPES y
240 if [ "$CONFIG_LOG_JUPES" = "y" ]; then
241 string ' Give the path and(or) filename of this log file' JPATH 'jupe.log'
243 bool 'Do you want to log OPMODEs and CLEARMODEs to a separate file' CONFIG_LOG_OPMODES y
244 if [ "$CONFIG_LOG_OPMODES" = "y" ]; then
245 string ' Give the path and(or) filename of this log file' OPATH 'opmode.log'
247 bool 'Do you want to log connecting users to a separate file' CONFIG_LOG_USERS
248 if [ "$CONFIG_LOG_USERS" = "y" ]; then
249 string ' Give the path and(or) filename of this log file' FNAME_USERLOG users.log
251 bool 'Do you want to log Opers to a separate file' CONFIG_LOG_OPERS
252 if [ "$CONFIG_LOG_OPERS" = "y" ]; then
253 string ' Give the path and(or) filename of this log file' FNAME_OPERLOG opers.log
255 if [ "$ac_cv_header_syslog_h" = "yes" ]; then
256 bool 'Do you want to use syslog' USE_SYSLOG
260 if [ "$USE_SYSLOG" = "y" ]; then
261 bool ' Log all operator kills to syslog' SYSLOG_KILL
262 bool ' Log all remote squits for all servers to syslog' SYSLOG_SQUIT
263 bool ' Log remote connect messages for other all servs' SYSLOG_CONNECT
264 bool ' Log all users who successfully become an Oper' SYSLOG_OPER
265 bool ' Send userlog stuff to syslog' SYSLOG_USERS
266 if [ "$SYSLOG_KILL" = "n" -a "$SYSLOG_SQUIT" = "n" -a \
267 "$SYSLOG_CONNECT" = "n" -a "$SYSLOG_OPER" = "n" -a \
268 "$SYSLOG_USERS" = "n" ]; then
269 define_macro LOG_FACILITY $LOG_FACILITY
270 define_bool USE_SYSLOG n
272 choice ' Log facility' \
273 "daemon CONFIG_DAEMON \
275 local0-7 CONFIG_LOCAL" daemon
276 if [ "$CONFIG_DAEMON" = "y" ]; then
277 define_macro LOG_FACILITY LOG_DAEMON
279 if [ "$CONFIG_USER" = "y" ]; then
280 define_macro LOG_FACILITY LOG_USER
282 int ' Which local facility (0-7)' INT_LOCAL
283 define_macro LOG_FACILITY LOG_LOCAL$INT_LOCAL
286 echo " Using log facility $LOG_FACILITY"
289 define_bool SYSLOG_KILL $SYSLOG_KILL
290 define_bool SYSLOG_SQUIT $SYSLOG_SQUIT
291 define_bool SYSLOG_CONNECT $SYSLOG_CONNECT
292 define_bool SYSLOG_OPER $SYSLOG_OPER
293 define_bool SYSLOG_USERS $SYSLOG_USERS
294 define_macro LOG_FACILITY $LOG_FACILITY
298 mainmenu_option next_comment
299 comment 'Configuration'
300 bool 'Use crypted passwords for operators' CRYPT_OPER_PASSWORD y
301 DUMMY=`echo "$BUFFERPOOL" | sed -e 's/[0-9]//g'`
302 if [ "$DUMMY" != "" ]; then
305 if [ "$HUB" = "y" ]; then
306 int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 27000000
308 int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 9000000
310 int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 1024
311 int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
312 int 'Default port for connections to other servers' SERVER_PORT 4400
313 int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
314 bool 'Allow Opers to see (dis)connects of local clients' ALLOW_SNO_CONNEXIT
315 if [ "$ALLOW_SNO_CONNEXIT" = "y" ]; then
316 bool 'Show IP address in client connection notices' SNO_CONNEXIT_IP
318 bool 'Do you want to use R: lines in your configuration file' R_LINES
319 if [ "$R_LINES" = "y" ]; then
320 bool 'Process R: lines every rehash' R_LINES_REHASH y
321 bool 'Process R: lines always' R_LINES_OFTEN
323 define_bool R_LINES_REHASH $R_LINES_REHASH
324 define_bool R_LINES_OFTEN $R_LINES_OFTEN
326 bool 'Do you want support for the old I:*:ONE:*:: construct (read help text!)' USEONE n
327 bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y
328 bool 'Kill connecting clients when forward and reverse DNS mismatch' KILL_IPMISMATCH n
331 mainmenu_option next_comment
332 comment 'Oper commands'
333 bool 'Allow (local) Opers to see all local invisible users' SHOW_INVISIBLE_USERS y
334 if [ "$SHOW_INVISIBLE_USERS" = "y" ]; then
335 bool 'Allow Opers to see all invisible users' SHOW_ALL_INVISIBLE_USERS y
337 bool 'Allow global Opers (O:) to see inside secret channels' OPERS_SEE_IN_SECRET_CHANNELS y
338 if [ "$OPERS_SEE_IN_SECRET_CHANNELS" = "y" ]; then
339 bool 'Allow local Opers (o:) to see inside secret channels' LOCOP_SEE_IN_SECRET_CHANNELS n
341 bool 'Do not truncate obnoxiously long /who output for opers' UNLIMIT_OPER_QUERY
342 bool 'Allow Opers to use the KILL command' OPER_KILL y
343 bool 'Allow Opers to use the REHASH command' OPER_REHASH y
344 bool 'Allow Opers to use the RESTART command' OPER_RESTART y
345 bool 'Allow Opers to use the DIE command' OPER_DIE y
346 bool 'Allow Opers to add local G-lines' OPER_LGLINE y
347 bool 'Allow Opers to connect from a remote site' OPER_REMOTE y
348 bool 'Allow local opers to use the REHASH command' LOCOP_REHASH y
349 bool 'Allow local opers to use the RESTART command' LOCOP_RESTART
350 bool 'Allow local opers to use the DIE command' LOCOP_DIE
351 bool 'Allow local opers to add local G-lines' LOCOP_LGLINE y
352 bool 'Allow local/global opers to be on any number of channels' OPER_NO_CHAN_LIMIT y
353 bool 'Allow local/global opers to set modes on local channels' OPER_MODE_LCHAN y
354 bool 'Allow local/global opers to walk through local channels modes' OPER_WALK_THROUGH_LMODES n
355 bool 'Prevent local/global opers from being kicked or deoped on local channels' NO_OPER_DEOP_LCHAN n
359 mainmenu_option next_comment
360 comment 'Server characteristics'
361 bool 'Do you want to have a default LIST parameter' CONFIG_LIST y
362 if [ "$CONFIG_LIST" = "y" ]; then
363 string 'Give default LIST parameter' DEFAULT_LIST 'T<10'
364 define_string DEFAULT_LIST_PARAM "$DEFAULT_LIST"
366 define_string DEFAULT_LIST "$DEFAULT_LIST"
367 define_bool DEFAULT_LIST_PARAM n
369 bool 'K: line comments treated as a file by default' COMMENT_IS_FILE y
370 bool 'Only nullify idle-time on PRIVMSG' IDLE_FROM_MSG y
373 mainmenu_option next_comment
374 comment 'Mandatory defines (you should leave these untouched)'
375 int 'Max auto connects per class (1!)' MAXIMUM_LINKS 1
376 if [ "$OPER_KILL" = "y" ]; then
377 bool 'Only allow KILLs of local clients' LOCAL_KILL_ONLY
379 define_bool LOCAL_KILL_ONLY $LOCAL_KILL_ONLY
381 int 'KILL nick chase time limit (30)' KILLCHASETIMELIMIT 30
382 int 'Max number of channels per user (recommended: 10)' MAXCHANNELSPERUSER 10
383 int 'Max number of silence masks (15!)' MAXSILES 15
384 int 'Expected average banmask length (40!)' AVBANLEN 40
385 eval define_macro MAXSILELENGTH \'\($AVBANLEN * MAXSILES\)\'
386 echo '* These are default values, used for class 0:'
387 int 'Max server idle time (60)' TIMESEC 60
388 int 'Class 0 ping frequency (120)' PINGFREQUENCY 120
389 int 'Class 0 connect frequency (600)' CONNECTFREQUENCY 600
390 int 'Min time before a link is good (300)' HANGONGOODLINK 300
391 int 'Wait before reconnecting to good link (10!)' HANGONRETRYDELAY 10
392 int 'connect(2) timeout (90!)' CONNECTTIMEOUT 90
393 int 'Max send queue (40000)' DEFAULTMAXSENDQLENGTH 40000
396 mainmenu_option next_comment
397 comment 'Experimental options (Do you know what you'\''re doing?)'
398 bool 'Use new MODE implementation' CONFIG_NEW_MODE y
399 bool 'Use new oper commands (JUPE, CLEARMODE, OPMODE, GLINE)' CONFIG_OPERCMDS y