"Fossies" - the Fresh Open Source Software Archive

Member "bahamut-2.1.5/include/config.h" (28 May 2020, 29744 Bytes) of package /linux/privat/bahamut-2.1.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "config.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.1.4_vs_2.1.5.

    1 /************************************************************************
    2  *   IRC - Internet Relay Chat, include/config.h
    3  *   Copyright (C) 1990 Jarkko Oikarinen
    4  *
    5  *   This program is free software; you can redistribute it and/or modify
    6  *   it under the terms of the GNU General Public License as published by
    7  *   the Free Software Foundation; either version 1, or (at your option)
    8  *   any later version.
    9  *
   10  *   This program is distributed in the hope that it will be useful,
   11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  *   GNU General Public License for more details.
   14  *
   15  *   You should have received a copy of the GNU General Public License
   16  *   along with this program; if not, write to the Free Software
   17  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   18  *
   19  */
   20 
   21 #ifndef __config_include__
   22 #define __config_include__
   23 
   24 #include "setup.h"
   25 #include "defs.h"
   26 
   27 
   28 /* READ THIS FIRST BEFORE EDITING!!!
   29  *
   30  * Most people will have no real reason to edit config.h, with the
   31  * exception of perhaps turning off certain things such as throttling
   32  * or flood protection options.  Most of the stuff you will have to edit
   33  * can be found in the ircd.conf - see doc/reference.conf for information
   34  * on that.
   35  */
   36 
   37 /*
   38  * NO_DEFAULT_INVISIBLE - clients not +i by default When defined, your
   39  * users will not automatically be attributed with user mode "i" (i ==
   40  * invisible). Invisibility means people dont showup in WHO or NAMES
   41  * unless they are on the same channel as you.
   42  */
   43 #undef  NO_DEFAULT_INVISIBLE
   44 
   45 /*
   46  * USE_SYSLOG - log errors and such to syslog() If you wish to have the
   47  * server send 'vital' messages about server through syslog, define
   48  * USE_SYSLOG. Only system errors and events critical to the server are
   49  * logged although if this is defined with FNAME_USERLOG, syslog() is
   50  * used instead of the above file. It is not recommended that this
   51  * option is used unless you tell the system administrator beforehand
   52  * and obtain their permission to send messages to the system log
   53  * files.
   54  * 
   55  * IT IS STRONGLY RECOMMENDED THAT YOU *DO* USE SYSLOG.  Many fatal ircd
   56  * errors are only logged to syslog.
   57  */
   58 #ifdef HAVE_SYSLOG_H
   59 #define USE_SYSLOG
   60 /*
   61  * SYSLOG_KILL SYSLOG_SQUIT SYSLOG_CONNECT SYSLOG_USERS SYSLOG_OPER If
   62  * you use syslog above, you may want to turn some (none) of the
   63  * spurious log messages for KILL,SQUIT,etc off.
   64  */
   65 #undef  SYSLOG_KILL     /* log all operator kills */
   66 #undef  SYSLOG_SQUIT            /* log all remote squits */
   67 #undef  SYSLOG_CONNECT          /* log remote connect messages */
   68 #undef  SYSLOG_USERS        /* send userlog stuff to syslog */
   69 #undef  SYSLOG_OPER     /* log all users who successfully oper */
   70 #undef  SYSLOG_BLOCK_ALLOCATOR /* debug block allocator */
   71 
   72 /*
   73  * LOG_FACILITY - facility to use for syslog() Define the facility you
   74  * want to use for syslog().  Ask your sysadmin which one you should
   75  * use.
   76  */
   77 #define LOG_FACILITY LOG_LOCAL4
   78 #endif /* HAVE_SYSLOG_H  */
   79 
   80 /* Defaults for things in option block of ircd.conf */
   81 
   82 /* WGMON notices are sent to users to warn them about the proxy scans. */
   83 #define DEFAULT_WGMON_URL "http://kline.dal.net/proxy/"
   84 #define DEFAULT_WGMON_HOST "some.bot.host"
   85 
   86 /* Hostmasking address */
   87 #define DEFAULT_STAFF_ADDRESS "staff.dalnet"
   88 
   89 /* Sent to users in 001 and 005 numerics */
   90 #define DEFAULT_NETWORK "DALnet"
   91 
   92 /* used for services aliases */
   93 #define DEFAULT_SERVICES_NAME "services.dal.net"
   94 #define DEFAULT_STATS_NAME "stats.dal.net"
   95 
   96 /* sent to users when they have been klined from the server */
   97 #define DEFAULT_NKLINE_ADDY "admin@badly.configured.server"
   98 #define DEFAULT_LKLINE_ADDY "admin@badly.configured.server"
   99 
  100 /* Sent to users when they encounter mode +R */
  101 #define DEFAULT_NS_REGISTER_URL "http://docs.dal.net/docs/nsemail.html"
  102 
  103 /* SpamFilter KB/Help URL (sent to users when they're getting warned/blocked by spamfilter) */
  104 #define DEFAULT_SPAMFILTER_URL "http://www.dal.net/kb/view.php?kb=411"
  105 
  106 /* self explanitory */
  107 #define DEFAULT_MAXCHANNELSPERUSER 10
  108 
  109 /* Default difference in time sync between servers before we complain */
  110 #define DEFAULT_TSMAXDELTA 120
  111 #define DEFAULT_TSWARNDELTA 15
  112 
  113 /* default clone limits */
  114 #define DEFAULT_LOCAL_IP_CLONES    10
  115 #define DEFAULT_LOCAL_IP24_CLONES  60
  116 #define DEFAULT_GLOBAL_IP_CLONES   25
  117 #define DEFAULT_GLOBAL_IP24_CLONES 150
  118 
  119 /* 
  120  * HIDEULINEDSERVS 
  121  * Define this if you want to hide the location of U:lined servers (and 
  122  * then clients on them) from nonopers. With this defined, no non-oper 
  123  * should be able to find out which server the U:lined server is connected
  124  * to. If you are connected to the main DALnet network, you MUST have this
  125  * enabled.
  126  */
  127 #define HIDEULINEDSERVS 1
  128 
  129 #define THROTTLE_ENABLE /* enable throttling, see below */
  130 
  131 /*
  132  * RWHO_PROBABILITY
  133  * Define this to enable probability calculation support for RWHO.
  134  */
  135 #define RWHO_PROBABILITY
  136 
  137 /* File names
  138  * the server will look for these files
  139  */
  140 #define MPATH   "ircd.motd"
  141 #define SMPATH  "ircd.smotd"
  142 #define LPATH   "ircd.log"
  143 #define PPATH   "ircd.pid"
  144 #define HPATH   "opers.txt"
  145 
  146 
  147 /* Services Definitions */
  148 #define CHANSERV "ChanServ"
  149 #define NICKSERV "NickServ"
  150 #define MEMOSERV "MemoServ"
  151 #define ROOTSERV "RootServ"
  152 #define OPERSERV "OperServ"
  153 #define STATSERV "StatServ"
  154 #define HELPSERV "HelpServ"
  155 
  156 /*
  157  * DENY_SERVICES_MSGS
  158  * Define this to cause PRIVMSG <service> to be rejected with numeric 487,
  159  * explaining that "/msg <service>" is no longer supported, and to use
  160  * "/msg <service>@<services_name>" or "/<service>" instead.
  161  */
  162 #define DENY_SERVICES_MSGS
  163 
  164 /*
  165  * PASS_SERVICES_MSGS
  166  * Define this to cause PRIVMSG <service> to be passed to services as-is,
  167  * instead of being converted to the shortform ("PRIVMSG NickServ" -> "NS").
  168  * Useful if services behaves differently when it gets a target of <service>
  169  * instead of <service>@<server>.
  170  */
  171 #define PASS_SERVICES_MSGS
  172 
  173 /*
  174  * SUPER_TARGETS_ONLY
  175  * Define this to allow the nick@server form of PRIVMSG/NOTICE to target super
  176  * servers only.  If not defined, the target may be on any server.
  177  */
  178 #define SUPER_TARGETS_ONLY
  179 
  180 /*
  181  * FNAME_USERLOG and FNAME_OPERLOG - logs of local USERS and OPERS
  182  * Define this filename to maintain a list of persons who log into this
  183  * server. Logging will stop when the file does not exist. Logging will
  184  * be disable also if you do not define this. FNAME_USERLOG just logs
  185  * user connections, FNAME_OPERLOG logs every successful use of /oper.
  186  * These are either full paths or files within DPATH.
  187  * 
  188  */
  189 
  190 #undef FNAME_USERLOG
  191 #undef FNAME_OPERLOG
  192 
  193 /*
  194 #define FNAME_USERLOG "/usr/local/ircd/users"   
  195 #define FNAME_OPERLOG "/usr/local/ircd/opers"
  196 */
  197 
  198 /* define this if you want to support non-noquit servers.  handy for
  199  * services that are not noquit compliant.
  200  */
  201 #undef NOQUIT
  202 
  203 /*
  204  * DEFAULT_KLINE_TIME
  205  *
  206  * Define this to the default time for a kline (in minutes) for klines with
  207  * unspecified times.  A time of 0 will create a permanent kline.
  208  */
  209 #define DEFAULT_KLINE_TIME 30
  210 
  211 /*
  212  * KLINE_MIN_STORE_TIME
  213  *
  214  * The minimum duration (in minutes) a kline must be before it will be stored
  215  * in the on-disk journal.
  216  */
  217 #define KLINE_MIN_STORE_TIME 180
  218 
  219 /*
  220  * KLINE_STORE_COMPACT_THRESH
  221  *
  222  * The maximum number of entries to write to the active kline storage journal
  223  * before compacting it.  This threshold prevents the journal from growing
  224  * indefinitely while klines are added and removed on a running server.
  225  */
  226 #define KLINE_STORE_COMPACT_THRESH 1000
  227 
  228 /*
  229  * Pretty self explanatory: These are shown in server notices and to the 
  230  * recipient of a "you are banned" message.
  231  */
  232 #define LOCAL_BAN_NAME "k-line"
  233 #define NETWORK_BAN_NAME "autokill"
  234 #define LOCAL_BANNED_NAME "k-lined"
  235 #define NETWORK_BANNED_NAME "autokilled"
  236 
  237 /*
  238  * RFC1035_ANAL Defining this causes ircd to reject hostnames with
  239  * non-compliant chars. undef'ing it will allow hostnames with _ or /
  240  * to connect
  241  */
  242 #define RFC1035_ANAL
  243 
  244 /*
  245  * IGNORE_FIRST_CHAR - define this for NO_MIXED_CASE if you wish to
  246  * ignore the first character
  247  */
  248 #define IGNORE_FIRST_CHAR
  249 
  250 /*
  251  * USERNAMES_IN_TRACE - show usernames in trace Define this if you want
  252  * to see usernames in /trace.
  253  */
  254 #define USERNAMES_IN_TRACE
  255 
  256 /*
  257  * DO_IDENTD - check identd if you undefine this, ircd will never check
  258  * identd regardless of @'s in I:lines.  You must still use @'s in your
  259  * I: lines to get ircd to do ident lookup even if you define this.
  260  */
  261 #define DO_IDENTD
  262 
  263 /* IDENTD_COMPLAIN - yell at users that don't have identd installed */
  264 #undef IDENTD_COMPLAIN
  265 
  266 /*
  267  * MOTD_WAIT - minimum seconds between use of MOTD, INFO, HELP, LINKS * 
  268  * before max use count is reset * -Dianora 
  269  */
  270 #define MOTD_WAIT 10
  271 
  272 /* MOTD_MAX * max use count before delay above comes into effect */
  273 #define MOTD_MAX 3
  274 
  275 /* SHOW_HEADERS - Shows messages like "looking up hostname" */
  276 #define SHOW_HEADERS
  277 
  278 /*
  279  * NO_OPER_FLOOD - disable flood control for opers define this to
  280  * remove flood control for opers
  281  */
  282 #define NO_OPER_FLOOD
  283 
  284 /*
  285  * SHOW_INVISIBLE_LUSERS - show invisible clients in LUSERS As defined
  286  * this will show the correct invisible count for anyone who does
  287  * LUSERS on your server. On a large net this doesnt mean much, but on
  288  * a small net it might be an advantage to undefine it.
  289  */
  290 #define SHOW_INVISIBLE_LUSERS
  291 
  292 /*
  293  * DEFAULT_HELP_MODE - default your opers to +h helper mode.  This
  294  * is strongly recommended
  295  */
  296 #define DEFAULT_HELP_MODE
  297 
  298 /*
  299  * NICER_UMODENOTICE_SEPARATION
  300  * By default, all usermode notices (+d, for instance) come as
  301  * :servername NOTICE nick :*** Notice -- blah blah
  302  * This makes them come as *** Debug, or *** Spy, etc.
  303  */
  304 #define NICER_UMODENOTICE_SEPARATION
  305 
  306 /*
  307  * MAXIMUM LINKS - max links for class 0 if no Y: line configured
  308  * 
  309  * This define is useful for leaf nodes and gateways. It keeps you from
  310  * connecting to too many places. It works by keeping you from
  311  * connecting to more than "n" nodes which you have C:blah::blah:6667
  312  * lines for.
  313  * 
  314  * Note that any number of nodes can still connect to you. This only
  315  * limits the number that you actively reach out to connect to.
  316  * 
  317  * Leaf nodes are nodes which are on the edge of the tree. If you want to
  318  * have a backup link, then sometimes you end up connected to both your
  319  * primary and backup, routing traffic between them. To prevent this,
  320  * #define MAXIMUM_LINKS 1 and set up both primary and secondary with
  321  * C:blah::blah:6667 lines. THEY SHOULD NOT TRY TO CONNECT TO YOU, YOU
  322  * SHOULD CONNECT TO THEM.
  323  * 
  324  * Gateways such as the server which connects Australia to the US can do a
  325  * similar thing. Put the American nodes you want to connect to in with
  326  * C:blah::blah:6667 lines, and the Australian nodes with C:blah::blah
  327  * lines. Have the Americans put you in with C:blah::blah lines. Then
  328  * you will only connect to one of the Americans.
  329  * 
  330  * This value is only used if you don't have server classes defined, and a
  331  * server is in class 0 (the default class if none is set).
  332  * 
  333  */
  334 #define MAXIMUM_LINKS 1
  335 
  336 /*
  337  * IRCII_KLUDGE - leave it defined Define this if you want the server
  338  * to accomplish ircII standard Sends an extra NOTICE in the beginning
  339  * of client connection
  340  */
  341 #undef IRCII_KLUDGE
  342 
  343 /*
  344  * CLIENT_FLOOD - client excess flood threshold this controls the
  345  * number of bytes the server will allow a client to send to the server
  346  * without processing before disconnecting the client for flooding it.
  347  * Values greater than 8000 make no difference to the server.
  348  */
  349 #define CLIENT_FLOOD    2560
  350 
  351 /*
  352  * CMDLINE_CONFIG - allow conf-file to be specified on command line
  353  * NOTE: defining CMDLINE_CONFIG and installing ircd SUID or SGID is a
  354  * MAJOR security problem - they can use the "-f" option to read any
  355  * files that the 'new' access lets them.
  356  */
  357 #define CMDLINE_CONFIG
  358 
  359 /*
  360  * FAILED_OPER_NOTICE - send a notice to all opers when someone tries
  361  * to /oper and uses an incorrect password.
  362  */
  363 #define FAILED_OPER_NOTICE
  364 
  365 /*
  366  * ANTI_NICK_FLOOD - prevents nick flooding define if you want to block
  367  * local clients from nickflooding
  368  */
  369 #define ANTI_NICK_FLOOD
  370 
  371 /*
  372  * defaults allow 4 nick changes in 20 seconds 
  373  */
  374 #define MAX_NICK_TIME 20
  375 #define MAX_NICK_CHANGES 4
  376 
  377 /* NO_AWAY_FLUD
  378  * reallow propregation of AWAY messages, but do not allow AWAY flooding
  379  * I reccomend a max of 5 AWAY's in 3 Minutes
  380  */
  381 #define NO_AWAY_FLUD
  382 
  383 #ifdef NO_AWAY_FLUD
  384 # define MAX_AWAY_TIME 180  /* time in seconds */
  385 # define MAX_AWAY_COUNT 5
  386 #endif
  387 
  388 /*
  389  * WARN_NO_NLINE Define this if you want ops to get noticed about
  390  * "things" trying to connect as servers that don't have N: lines.
  391  * Twits with misconfigured servers can get really annoying with
  392  * enabled.
  393  */
  394 #define WARN_NO_NLINE
  395 
  396 /*
  397  * RIDICULOUS_PARANOIA_LEVEL
  398  *
  399  * This indicates the level of ridiculous paranoia the admin has.
  400  * The settings are as follows:
  401  *
  402  * 0 - No hostmasking is available.
  403  * 1 - All +A users can see the real IP.
  404  * 2 - Local +A can see the real IP.
  405  * 3 - Noone can see the real IP.  It is still logged.
  406  *
  407  * WARNING:
  408  * Running levels above 1 on DALnet will result in your server being juped
  409  * from the network if a security breech is suspected.
  410  *
  411  * If level 3 is selected, USE_SYSLOG must be defined.
  412  */
  413 #define RIDICULOUS_PARANOIA_LEVEL 1
  414 #if (RIDICULOUS_PARANOIA_LEVEL==3)
  415 #ifndef USE_SYSLOG
  416 #error "USE_SYSLOG MUST BE DEFINED FOR LEVEL 3"
  417 #endif
  418 #endif
  419 
  420 /*
  421  * Forward /quote help to HelpServ
  422  *
  423  * If defined, any /quote help requests from users sent to the ircd
  424  * will forward the help message over to HelpServ if defined, as
  425  * well as the default HelpServ topic request command. -srd
  426  */
  427 #define HELP_FORWARD_HS
  428 #ifdef HELP_FORWARD_HS
  429 # define DEF_HELP_CMD "?"
  430 #endif
  431 
  432 /*
  433  * For all of these options below, #define NETWORK_PARANOIA
  434  * and leave the individual ones alone.
  435  */
  436 #undef NETWORK_PARANOIA
  437 
  438 /*
  439  * NO_USER_SERVERKILLS
  440  * Users can't set mode +k
  441  *
  442  * NO_USER_OPERKILLS
  443  * Users can't set mode +s
  444  *
  445  * NO_USER_STATS
  446  * Users can't get /stats from anything
  447  *
  448  * NO_LOCAL_USER_STATS
  449  * Local users can't get /stats from anything, each server does its own 
  450  * checking (not recommended)
  451  * No effect if NO_USER_STATS is defined 
  452  *
  453  * NO_USER_TRACE
  454  * Users can't use TRACE
  455  *
  456  * NO_USER_OPERTARGETED_COMMANDS
  457  * Users can't do /motd oper, /admin oper, /whois oper oper, 
  458  * /whois server.* oper on any oper that is set +I 
  459  * (see oper hiding section)
  460  *
  461  * HIDE_NUMERIC_SOURCE
  462  * All numerics going out to local clients come from the local server
  463  * Necessary for numerics from remote servers not giving information away
  464  * 
  465  * HIDE_KILL_ORIGINS
  466  * All /kills appear, from a user standpoint, to come from HIDDEN_SERVER_NAME
  467  * Note that NO_USER_OPERKILLS and NO_USER_SERVERKILLS must be defined for
  468  * this to actually provide any security.
  469  *
  470  * HIDE_SPLIT_SERVERS
  471  * Hide the names of servers during netsplits
  472  *
  473  * HIDE_SERVERMODE_ORIGINS
  474  * Hide the origins of server modes (ie, in netjoins).
  475  * (They will all come from me.name)
  476  */
  477 #define NO_USER_SERVERKILLS
  478 /* #undef NO_USER_OPERKILLS */
  479 /* #undef NO_USER_STATS */
  480 /* #undef NO_LOCAL_USER_STATS */
  481 /* #undef NO_USER_TRACE */
  482 /* #undef NO_USER_OPERTARGETED_COMMANDS */
  483 /* #undef HIDE_NUMERIC_SOURCE */
  484 /* #undef HIDE_KILL_ORIGINS */
  485 /* #undef HIDE_SPLIT_SERVERS */
  486 /* #undef HIDE_SERVERMODE_ORIGINS */
  487 
  488 /***********************/
  489 /* OPER HIDING SECTION */
  490 /***********************/
  491 
  492 /* 
  493  * ALLOW_HIDDEN_OPERS
  494  * 
  495  * Allow your opers to be set +I (hidden) -- required for the commands below
  496  * If not defined, everything below in the oper hiding section must be 
  497  * undefined.
  498  */
  499 #undef ALLOW_HIDDEN_OPERS
  500 
  501 /*
  502  * DEFAULT_MASKED_HIDDEN
  503  * 
  504  * Makes all your opers that hostmasked +I (hidden) by default
  505  * ALLOW_HIDDEN_OPERS must be defined with this enabled.
  506  */
  507 #undef DEFAULT_MASKED_HIDDEN
  508 
  509 /*
  510  * ALL_OPERS_HIDDEN
  511  * 
  512  * Makes all your opers on a 'hidden' server by default (sets +I at /oper)
  513  * ALLOW_HIDDEN_OPERS must be defined with this enabled.
  514  * DEFAULT_MASKED_HIDDEN is reccommended with this enabled.
  515  */
  516 #undef ALL_OPERS_HIDDEN
  517 
  518 /*
  519  * FORCE_OPERS_HIDDEN
  520  *
  521  * Makes it so that all opers can't set -I (not hidden)
  522  *
  523  * Define ALL_OPERS_HIDDEN, DEFAULT_MASKED_HIDDEN, ALLOW_HIDDEN_OPERS
  524  * with this as well, or things will not work properly
  525  */
  526 #undef FORCE_OPERS_HIDDEN
  527 
  528 /*
  529  * FORCE_EVERYONE_HIDDEN
  530  *
  531  * Makes it so that everyone on your server is set +I and can't set -I
  532  * 
  533  * Every other hidden option in the oper hiding section must be 
  534  * defined as well.
  535  */
  536 #undef FORCE_EVERYONE_HIDDEN
  537 
  538 /* 
  539  * Show these for hidden opers, self explanatory
  540  * DO NOT CHANGE ON A SERVER TO SERVER BASIS
  541  * THESE ARE NETWORK-WIDE!
  542  */
  543 #define HIDDEN_SERVER_NAME "*.dal.net"
  544 #define HIDDEN_SERVER_DESC "DALnet IRC Network"
  545 
  546 /***************************/
  547 /* END OPER HIDING SECTION */
  548 /***************************/
  549 
  550 #ifdef NETWORK_PARANOIA
  551 # define NO_USER_SERVERKILLS
  552 # define NO_USER_OPERKILLS
  553 # define NO_USER_STATS
  554 # define NO_USER_TRACE
  555 # define NO_USER_OPERTARGETED_COMMANDS
  556 # define HIDE_NUMERIC_SOURCE
  557 # define HIDE_KILL_ORIGINS
  558 # define HIDE_SPLIT_SERVERS
  559 # define HIDE_SERVERMODE_ORIGINS
  560 #endif
  561 
  562 /* EXEMPT_LISTS and INVITE_LISTS
  563  * Written by Sedition, Feb.04
  564  */
  565 #define EXEMPT_LISTS
  566 #define INVITE_LISTS
  567 
  568 /*
  569  * USE_SSL - Add SSL support for users
  570  */
  571 #ifdef HAVE_ENCRYPTION_ON
  572                         #define USE_SSL
  573                         #define IRCDSSL_KPATH "ircd.key"
  574                         #define IRCDSSL_CPATH "ircd.crt"
  575 #endif
  576 
  577 /******************************************************************
  578  * STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP
  579  *
  580  * You shouldn't change anything below this line, unless absolutely
  581  * needed.
  582  */
  583 
  584 /*
  585  * PING_NAZI
  586  *
  587  * be nazi-ish about pings (re-check every client connect, 
  588  * user registration, etc)
  589  */
  590 #undef PING_NAZI
  591 
  592 /*
  593  * ALWAYS_SEND_DURING_SPLIT
  594  * on a large network, if your server is carrying large amounts of clients,
  595  * and your server splits from the main network, the amount of allocated
  596  * dbufs will skyrocket as buffers fill up with QUIT messages. This code
  597  * attempts to combat this by sending out data whenever possible during a
  598  * split. - lucas
  599  */
  600 #define ALWAYS_SEND_DURING_SPLIT
  601 
  602 /* INITIAL_DBUFS - how many dbufs to preallocate */
  603 #define INITIAL_DBUFS 1024  /* preallocate 2 megs of dbufs */
  604 
  605 
  606 /* INITIAL_SBUFS_X - how many bytes of sbufs to preallocate */
  607 #define INITIAL_SBUFS_SMALL 2 * (1 << 20) /* 2 meg */
  608 #define INITIAL_SBUFS_LARGE 2 * (1 << 20) /* 2 meg */
  609 #define INITIAL_SBUFS_USERS 256           /* number of sbuf user structs to pool */
  610 
  611 /*
  612  * MAXBUFFERS - increase socket buffers
  613  * 
  614  * Increase send & receive socket buffer up to 64k, keeps clients at 8K
  615  * and only raises servers to 64K
  616  */
  617 #define MAXBUFFERS
  618 
  619 /*
  620  * PORTNUM - default port where ircd resides Port where ircd resides.
  621  * NOTE: This *MUST* be greater than 1024 if you plan to run ircd under
  622  * any other uid than root.
  623  */
  624 #define PORTNUM 7000 /* 7000 for DALnet */
  625 
  626 /*
  627  * NICKNAMEHISTORYLENGTH - size of WHOWAS array this defines the length
  628  * of the nickname history.  each time a user changes nickname or signs
  629  * off, their old nickname is added to the top of the list. NOTE: this
  630  * is directly related to the amount of memory ircd will use whilst
  631  * resident and running - it hardly ever gets swapped to disk!  Memory
  632  * will be preallocated for the entire whowas array when ircd is
  633  * started.
  634  */
  635 #define NICKNAMEHISTORYLENGTH 8192
  636 
  637 /*
  638  * TIMESEC - Time interval to wait and if no messages have been
  639  * received, then check for PINGFREQUENCY and CONNECTFREQUENCY
  640  */
  641 #define TIMESEC  5      /* Recommended value: 5 */
  642 
  643 /*
  644  * MAXSENDQLENGTH - Max amount of internal send buffering Max amount of
  645  * internal send buffering when socket is stuck (bytes)
  646  */
  647 #define MAXSENDQLENGTH 5050000
  648 
  649 /*
  650  * PINGFREQUENCY - ping frequency for idle connections If daemon
  651  * doesn't receive anything from any of its links within PINGFREQUENCY
  652  * seconds, then the server will attempt to check for an active link
  653  * with a PING message. If no reply is received within (PINGFREQUENCY *
  654  * 2) seconds, then the connection will be closed.
  655  */
  656 #define PINGFREQUENCY    120    /* Recommended value: 120 */
  657 
  658 /*
  659  * CONNECTFREQUENCY - time to wait before auto-reconencting If the
  660  * connection to to uphost is down, then attempt to reconnect every
  661  * CONNECTFREQUENCY  seconds.
  662  */
  663 #define CONNECTFREQUENCY 600    /* Recommended value: 600 */
  664 
  665 /*
  666  * HANGONGOODLINK and HANGONGOODLINK Often net breaks for a short time
  667  * and it's useful to try to establishing the same connection again
  668  * faster than CONNECTFREQUENCY would allow. But, to keep trying on bad
  669  * connection, we require that connection has been open for certain
  670  * minimum time (HANGONGOODLINK) and we give the net few seconds to
  671  * steady (HANGONRETRYDELAY). This latter has to be long enough that
  672  * the other end of the connection has time to notice it broke too.
  673  * 1997/09/18 recommended values by ThemBones for modern Efnet
  674  */
  675 
  676 #define HANGONRETRYDELAY 60 /* Recommended value: 30-60 seconds */
  677 #define HANGONGOODLINK 3600 /* Recommended value: 30-60 minutes */
  678 
  679 /*
  680  * WRITEWAITDELAY - Number of seconds to wait for write to complete if
  681  * stuck.
  682  */
  683 #define WRITEWAITDELAY     10   /* Recommended value: 15 */
  684 
  685 /*
  686  * CONNECTTIMEOUT - Number of seconds to wait for a connect(2) call to
  687  * complete. NOTE: this must be at *LEAST* 10.  When a client connects,
  688  * it has CONNECTTIMEOUT - 10 seconds for its host to respond to an
  689  * ident lookup query and for a DNS answer to be retrieved.
  690  */
  691 #define CONNECTTIMEOUT  30  /* Recommended value: 30 */
  692 
  693 /*
  694  * KILLCHASETIMELIMIT - Max time from the nickname change that still
  695  * causes KILL automaticly to switch for the current nick of that user.
  696  * (seconds)
  697  */
  698 #define KILLCHASETIMELIMIT 90   /* Recommended value: 90 */
  699 
  700 /*
  701  * FLUD - CTCP Flood Detection and Protection
  702  * 
  703  * This enables server CTCP flood detection and protection for local
  704  * clients. It works well against fludnets and flood clones.  The
  705  * effect of this code on server CPU and memory usage is minimal,
  706  * however you may not wish to take the risk, or be fundamentally
  707  * opposed to checking the contents of PRIVMSG's (though no privacy is
  708  * breached).  This code is not useful for routing only servers (ie,
  709  * HUB's with little or no local client base), and the hybrid team
  710  * strongly recommends that you do not use FLUD with HUB. The following
  711  * default thresholds may be tweaked, but these seem to work well.
  712  */
  713 #define FLUD
  714 
  715 /*
  716  * ANTI_SPAMBOT if ANTI_SPAMBOT is defined try to discourage spambots
  717  * The defaults =should= be fine for the timers/counters etc. but you
  718  * can play with them. -Dianora
  719  * 
  720  * Defining this also does a quick check whether the client sends us a
  721  * "user foo x x :foo" where x is just a single char.  More often than
  722  * not, it's a bot if it did. -ThemBones
  723  */
  724 #define ANTI_SPAMBOT
  725 
  726 /*
  727  * ANTI_SPAMBOT parameters, don't touch these if you don't understand
  728  * what is going on.
  729  * 
  730  * if a client joins MAX_JOIN_LEAVE_COUNT channels in a row, but spends
  731  * less than MIN_JOIN_LEAVE_TIME seconds on each one, flag it as a
  732  * possible spambot. disable JOIN for it and PRIVMSG but give no
  733  * indication to the client that this is happening. every time it tries
  734  * to JOIN OPER_SPAM_COUNTDOWN times, flag all opers on local server.
  735  * If a client doesn't LEAVE a channel for at least 2 minutes the
  736  * join/leave counter is decremented each time a LEAVE is done
  737  * 
  738  */
  739 #define MIN_JOIN_LEAVE_TIME  60
  740 #define MAX_JOIN_LEAVE_COUNT  25
  741 #define OPER_SPAM_COUNTDOWN   5
  742 #define JOIN_LEAVE_COUNT_EXPIRE_TIME 120
  743 
  744 /*
  745  * If ANTI_SPAMBOT_WARN_ONLY is #define'd Warn opers about possible
  746  * spambots only, do not disable JOIN and PRIVMSG if possible spambot
  747  * is noticed Depends on your policies.
  748  */
  749 #undef ANTI_SPAMBOT_WARN_ONLY
  750 
  751 #ifdef FLUD
  752 # define FLUD_NUM      4    /* Number of flud messages to trip alarm */
  753 # define FLUD_TIME  3   /* Seconds in which FLUD_NUM msgs must occur */
  754 # define FLUD_BLOCK 15  /* Seconds to block fluds */
  755 #endif
  756 
  757 /*
  758  * If the OS has SOMAXCONN use that value, otherwise Use the value in
  759  * HYBRID_SOMAXCONN for the listen(); backlog try 5 or 25. 5 for AIX
  760  * and SUNOS, 25 should work better for other OS's
  761  */
  762 #define HYBRID_SOMAXCONN 25
  763 
  764 /*
  765  * Throttling support:
  766  * THROTTLE_ENABLE    - enable throttling code, if undefined, the functions
  767  *                      will be empty.  runtime settable.
  768  * THROTTLE_TRIGCOUNT - number of connections to triggle throttle action
  769  * THROTTLE_TRIGTIME  - number of seconds in which THROTTLE_TRIGCOUNT must
  770  *                      happen
  771  * THROTTLE_RECORDTIME- length to keep records for each ip (since last connect
  772                         from this ip)
  773  * THROTTLE_HASHSIZE  - size of the throttle hashtable, also tuneable
  774  *
  775  * Recommended values: 3, 15, 1800.  3+ connections in 15 or less seconds will
  776  * result in a connection throttle z:line.  These are also
  777  * z: line time grows, pseudo-exponentially 
  778  *  first zline : 2 minutes
  779  *  second zline: 5 minutes
  780  *  third zline : 15 minutes
  781  *  fourth zline: 30 minutes
  782  *  anything more is an hour
  783  * tuneable at runtime.  -wd */
  784 /* part of options.h now #define THROTTLE_ENABLE */
  785 #define THROTTLE_TRIGCOUNT 3
  786 #define THROTTLE_TRIGTIME 15
  787 #define THROTTLE_RECORDTIME 1800
  788 #define THROTTLE_HASHSIZE 25147
  789 
  790 /*
  791  * Message-throttling support.
  792  * MSG_TARGET_LIMIT: if defined, imposes limits on message targets
  793  * MSG_TARGET_MIN: initial number of message targets allowed (recommend 5 or less)
  794  * MSG_TARGET_MAX: maximum number of message targets stored (recommend 5 or
  795  *                 less)
  796  * MSG_TARGET_MINTOMAXTIME: number of seconds a user must be online
  797  *                          before given MSG_TARGET_MAX targets
  798  * MSG_TARGET_TIME: time before message targets expire (this is what you should
  799  *                  tweak)
  800  */
  801 
  802 #define MSG_TARGET_LIMIT
  803 #define MSG_TARGET_MIN  5
  804 #define MSG_TARGET_MAX  8 /* MUST BE >= MSG_TARGET_MIN!!! */
  805 #define MSG_TARGET_MINTOMAXTIME 300
  806 #define MSG_TARGET_TIME 45
  807 
  808 /*
  809  * Channel joining rate-throttling support
  810  *
  811  * DEFAULT_JOIN_NUM:  number of joins to allow, network-wide, in a period of
  812  *                    DEFAULT_JOIN_TIME seconds.
  813  * DEFAULT_JOIN_TIME: time to collect joins.
  814  * JOINRATE_SERVER_ONLY: Only let servers/U: lined things set +j.
  815  *                       KEEP THIS IF USING A NETWORK WITH PRE-1.4.36 SERVERS!
  816  */
  817 /* defaults are very forgiving. */
  818 #define DEFAULT_JOIN_NUM  8
  819 #define DEFAULT_JOIN_TIME 6
  820 #undef JOINRATE_SERVER_ONLY
  821 
  822 /*
  823  * Don't allow local clients to set CIDR channel bans/invites/exempts
  824  * until all servers and services are upgraded.
  825  */
  826 #undef NO_LOCAL_CIDR_CHANNELBANS
  827 
  828 /* Debugging configs */
  829 
  830 #undef DNS_DEBUG
  831 
  832 /*
  833  * DEBUGMODE is used mostly for internal development, it is likely to
  834  * make your client server very sluggish. You usually shouldn't need
  835  * this. -Dianora
  836  *
  837  * Currently, DEBUGMODE is pretty much useless.
  838  * Don't use it. - lucas
  839  */
  840 #undef  DEBUGMODE       /* define DEBUGMODE to enable */
  841 #undef DUMP_DEBUG
  842 
  843 /*
  844  * MEMTRACE enables additional memory accounting for display in STATS Z.
  845  * Requires GNU C extensions for expression blocks.
  846  */
  847 #undef MEMTRACE
  848 
  849 /* DONT_CHECK_QLINE_REMOTE
  850  * Don't check for Q:lines on remote clients.  We can't do anything
  851  * if a remote client is using a nick q:lined locally, so
  852  * why check?  If you don't care about the wasted CPU, and you're
  853  * curious, feel free to #define this.  I recommend you don't
  854  * on a client server unless it's got a lot of power.
  855  * -wd */
  856 #define DONT_CHECK_QLINE_REMOTE
  857 
  858 /* USER_HOSTMASKING is used to enable host-masking for users.
  859  * If you are connected to the main DALnet network, you should not
  860  * have this enabled yet.
  861  */
  862 #define USER_HOSTMASKING
  863 
  864 /* SPAMFILTER is used to enable spam filtering on the network.
  865  * If you are connected to the main DALnet network, you should
  866  * have this enabled.
  867  */
  868 #define SPAMFILTER
  869 
  870 /*
  871  * DEFAULT_OPER_SPAMFILTER_DISABLED - default your opers to +P, which disables spamfilter checking.  This
  872  * is strongly recommended so that users can report potential spam.
  873  */
  874 #ifdef SPAMFILTER
  875 #define DEFAULT_OPER_SPAMFILTER_DISABLED
  876 #endif
  877 
  878 /*
  879  * USE_HALFOPS is used to enable half-ops support
  880  * If you are connected to the main DALnet network, you should
  881  * have this enabled.
  882  */
  883 #define USE_HALFOPS
  884 
  885 /*
  886  * Don't allow local clients to use +h/-h until all servers and services are upgraded.
  887  */
  888 #define NO_LOCAL_CMODE_h
  889 
  890 /* ------------------------- END CONFIGURATION SECTION -------------------- */
  891 #ifdef APOLLO
  892 #define RESTARTING_SYSTEMCALLS
  893 #endif /*
  894         * read/write are restarted after signals
  895         * defining this 1, gets siginterrupt call
  896         * compiled, which attempts to remove this
  897         * behaviour (apollo sr10.1/bsd4.3 needs this) 
  898         */
  899 
  900 #define HELPFILE HPATH
  901 #define MOTD MPATH
  902 #define SHORTMOTD SMPATH
  903 #define IRCD_PIDFILE PPATH
  904 
  905 /* token bucket size for join rate stuffs */
  906 #define DEFAULT_JOIN_SIZE (DEFAULT_JOIN_NUM * DEFAULT_JOIN_TIME)
  907 
  908 /* enforce a minimum, even though it'll probably break at runtime */
  909 #if (MAXCONNECTIONS < 20)
  910 # undef MAXCONNECTIONS
  911 # define MAXCONNECTIONS 20
  912 #endif
  913 
  914 #if (MAXCONNECTIONS > 1000)
  915 # define MAX_BUFFER (MAXCONNECTIONS / 100)
  916 #else
  917 # define MAX_BUFFER 10
  918 #endif
  919 
  920 #define MAX_ACTIVECONN (MAXCONNECTIONS - MAX_BUFFER)
  921 
  922 #if defined(CLIENT_FLOOD) && ((CLIENT_FLOOD > 8000) || (CLIENT_FLOOD < 512))
  923 #error CLIENT_FLOOD needs redefining.
  924 #endif
  925 
  926 #if !defined(CLIENT_FLOOD)
  927 #error CLIENT_FLOOD undefined.
  928 #endif
  929 
  930 #if defined(DEBUGMODE) || defined(DNS_DEBUG)
  931 extern void debug(int level, char *pattern, ...);
  932 #define Debug(x) do { debug x } while (0);
  933 #define LOGFILE LPATH
  934 #else
  935 #define Debug(x) do {} while (0);
  936 #define LOGFILE "/dev/null"
  937 #endif
  938 
  939 #define CONFIG_H_LEVEL_184
  940 #endif              /* __config_include__ */