Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Tue, 19 Dec 2000 21:37:58 +0000 (21:37 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Tue, 19 Dec 2000 21:37:58 +0000 (21:37 +0000)
Log message:

Removed last vestiges of GODMODE; made a whole bunch of formerly compile-
time options into run-time options through the features subsystem; bashed
a couple of bugs in ircd_log.c and m_ison.c; added a new "read-only" flag
to ircd_features.c.

Testing:

Compiles and runs; m_ison.c compiles.  Again, needs extensive testing; turn
the features on and off and see what happens.

NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE

Make sure you add "F:HUB:TRUE" to your ircd.conf if you normally turn HUB
on.  I may make HUB go away completely in the future, but not until
m_server gets rewritten from scratch.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@350 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

25 files changed:
ChangeLog
config/config-sh.in
include/ircd_features.h
include/querycmds.h
include/sys.h
ircd/Makefile.in
ircd/dbuf.c
ircd/ircd.c
ircd/ircd_features.c
ircd/ircd_log.c
ircd/m_connect.c
ircd/m_ison.c
ircd/m_oper.c
ircd/m_privmsg.c
ircd/m_server.c
ircd/m_settime.c
ircd/motd.c
ircd/numnicks.c
ircd/parse.c
ircd/s_auth.c
ircd/s_bsd.c
ircd/s_conf.c
ircd/s_debug.c
ircd/s_err.c
ircd/s_user.c

index df1ad9a53c1ab4b3628e71c45ec6ac6e494ea3e4..655800148005ac9f3f4d9e8a784373c5d7084f25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,81 @@
+2000-12-19  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * ircd/m_ison.c (m_ison): Dianora says that ISON has to end with a
+       space (*sigh* stupid clients...)
+
+       * ircd/s_user.c: make WALLOPS_OPER_ONLY a feature managed through
+       ircd_features.[ch]
+
+       * ircd/s_err.c: get rid of GODMODE conditionals
+
+       * ircd/s_debug.c (debug_serveropts): switch to using appropriate
+       calls into the features subsystem for various serveropts
+       characters
+
+       * ircd/s_conf.c (find_conf_entry): get rid of USEONE conditional
+
+       * ircd/s_bsd.c: remove GODMODE conditional; use features subsystem
+       to get value of VIRTUAL_HOST and CLIENT_FLOOD; remove
+       NOFLOWCONTROL conditional
+
+       * ircd/s_auth.c: use features subsystem to determine value of
+       KILL_IPMISMATCH
+
+       * ircd/parse.c: get rid of NOOPER and GODMODE conditionals; use
+       features subsystem to determine the setting of IDLE_FROM_MSG
+
+       * ircd/numnicks.c: get rid of EXTENDED_NUMERICS conditionals
+
+       * ircd/motd.c: get value of NODEFAULTMOTD from features subsystem;
+       use features subsystem to get motd file names
+
+       * ircd/m_settime.c: get value of RELIABLE_CLOCK from features
+       subsystem
+
+       * ircd/m_server.c: get rid of CRYPT_LINK_PASSWORD, since it does
+       us no good; use features subsystem to figure out if we need to do
+       HUB-type stuff; make TESTNET debugging sendto_opmask_butone's use
+       the Debug(()) macro instead; get value of RELIABLE_CLOCK from
+       features subsystem
+
+       * ircd/m_privmsg.c: get IDLE_FROM_MSG from the features subsystem
+
+       * ircd/m_oper.c: get CRYPT_OPER_PASSWORD from the features
+       subsystem
+
+       * ircd/m_connect.c: get SERVER_PORT from the features subsystem
+
+       * ircd/ircd_log.c (log_set_file): fix a bug that kept log files
+       from getting marked if they were already set to something...
+
+       * ircd/ircd_features.c: add a flag to indicates read-only access;
+       add several new features that used to be compile-time selected
+
+       * ircd/ircd.c: grab pidfile out of feature subsystem; don't check
+       access to motd files (what the heck?); make sure to initialize the
+       feature subsystem before trying to write the config file
+
+       * ircd/dbuf.c: use feature_int() to retrieve BUFFERPOOL settings;
+       use feature_bool() to figure out if we're using the FERGUSON
+       flusher
+
+       * ircd/Makefile.in: MPATH and RPATH are now done differently, so
+       remove the clause that creates empty files of that name; also ran
+       make depend
+
+       * include/sys.h: CLIENT_FLOOD is now a feature; unfortunately,
+       there is no easy way to bounds-check it at present
+
+       * include/querycmds.h: make sure ircd_features.h is included; use
+       feature_str(FEAT_DOMAINNAME) in calls to match()
+
+       * include/ircd_features.h: many new features that used to be
+       compile-time selected
+
+       * config/config-sh.in: add * to DOMAINNAME; try also using first
+       argument to search in /etc/resolv.conf; removed many compile-time
+       options that now can be configured through the features system
+
 2000-12-18  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * doc/api/log.txt: how to use the logging API
 2000-12-18  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * doc/api/log.txt: how to use the logging API
index d464cd82afc170fceeb91168ed6346635ca9d810..f5661c20b3285cca2c358b560a17fe155496a2d3 100644 (file)
@@ -169,14 +169,17 @@ fi
 mainmenu_option next_comment
 comment 'Host specific defines'
   if [ -f /etc/resolv.conf ]; then
 mainmenu_option next_comment
 comment 'Host specific defines'
   if [ -f /etc/resolv.conf ]; then
-    DOMAINNAME_DEFAULT="`awk '/^domain/ { print $2; exit }' /etc/resolv.conf`"
+    DOMAINNAME_DEFAULT="`awk '/^domain/ { print "*" $2; exit }' /etc/resolv.conf`"
   fi
   fi
-  string 'What is the domain name of your network' DOMAINNAME $DOMAINNAME_DEFAULT
-  if [ -z "$DOMAINNAME" ]; then
-    DOMAINNAME=none
+  if [ -z "$DOMAINNAME_DEFAULT" ]; then
+    DOMAINNAME_DEFAULT="`awk '/^search/ { print "*" $2; exit }' /etc/resolv.conf`"
   fi
   fi
+  if [ -z "$DOMAINNAME_DEFAULT" ]; then
+    DOMAINNAME_DEFAULT=none
+  fi
+  define_string DOMAINNAME $DOMAINNAME_DEFAULT
+
   string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
   string 'Please give a random seed of eight characters' RANDOM_SEED 12345678
-  bool 'Does your host have a reliable clock' RELIABLE_CLOCK
 endmenu
 
 mainmenu_option next_comment
 endmenu
 
 mainmenu_option next_comment
@@ -195,12 +198,6 @@ comment 'General defines'
       echo "   SECURITY: Then don't install the daemon SUID or SGID !"
     fi
   fi
       echo "   SECURITY: Then don't install the daemon SUID or SGID !"
     fi
   fi
-  bool 'Do you need virtual hosting' VIRTUAL_HOST
-  PREV_HUB=$HUB
-  bool 'Will you connect to more then one server at a time' HUB
-  if [ "$PREV_HUB" != "$HUB" ]; then
-    BUFFERPOOL=
-  fi
 endmenu
 
 
 endmenu
 
 
@@ -215,43 +212,17 @@ comment 'Paths and files'
   fi
   echo "The following filenames are either full paths or files within DPATH"
   string 'Server configuration file' CPATH 'ircd.conf'
   fi
   echo "The following filenames are either full paths or files within DPATH"
   string 'Server configuration file' CPATH 'ircd.conf'
-  string 'Server MOTD file' MPATH 'ircd.motd'
-  string 'Server remote MOTD file (3 lines max)' RPATH 'remote.motd'
   if [ "$DEBUGMODE" = "y" ]; then
     string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
   else
     define_string LPATH "$LPATH"
   fi
   if [ "$DEBUGMODE" = "y" ]; then
     string 'Debug file if DEBUGMODE' LPATH '/tmp/ircd.log'
   else
     define_string LPATH "$LPATH"
   fi
-  string 'File for server pid' PPATH 'ircd.pid'
 endmenu
 
 mainmenu_option next_comment
 comment 'Configuration'
 endmenu
 
 mainmenu_option next_comment
 comment 'Configuration'
-  bool 'Use crypted passwords for operators' CRYPT_OPER_PASSWORD y
-  DUMMY=`echo "$BUFFERPOOL" | sed -e 's/[0-9]//g'`
-  if [ "$DUMMY" != "" ]; then
-    BUFFERPOOL=
-  fi
-  if [ "$HUB" = "y" ]; then
-    int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 27000000
-  else
-    int 'Max size of the total of of all sendqs (bytes)' BUFFERPOOL 9000000
-  fi
-  bool 'Aggressively empty the sendqpool (Read Help!)' HAS_FERGUSON_FLUSHER n
-  int 'Max receive queue for clients (bytes)' CLIENT_FLOOD 1024
   int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
   int 'Maximum number of network connections (23 - (FD_SETSIZE-4))' MAXCONNECTIONS 252
-  int 'Default port for connections to other servers' SERVER_PORT 4400
   int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
   int 'Nickname history length' NICKNAMEHISTORYLENGTH 800
-  bool 'Do you want to use R: lines in your configuration file' R_LINES
-  if [ "$R_LINES" = "y" ]; then
-    bool 'Process R: lines every rehash' R_LINES_REHASH y
-    bool 'Process R: lines always' R_LINES_OFTEN
-  else
-    define_bool R_LINES_REHASH $R_LINES_REHASH
-    define_bool R_LINES_OFTEN $R_LINES_OFTEN
-  fi
-  bool 'Send a short message instead of the MOTD to connecting clients' NODEFAULTMOTD y
-  bool 'Kill connecting clients when forward and reverse DNS mismatch' KILL_IPMISMATCH n
 endmenu
 
 mainmenu_option next_comment
 endmenu
 
 mainmenu_option next_comment
@@ -264,8 +235,6 @@ comment 'Server characteristics'
     define_string DEFAULT_LIST "$DEFAULT_LIST"
     define_bool DEFAULT_LIST_PARAM n
   fi
     define_string DEFAULT_LIST "$DEFAULT_LIST"
     define_bool DEFAULT_LIST_PARAM n
   fi
-  bool 'K: line comments treated as a file by default' COMMENT_IS_FILE y
-  bool 'Only nullify idle-time on PRIVMSG' IDLE_FROM_MSG y
 endmenu
 
 mainmenu_option next_comment
 endmenu
 
 mainmenu_option next_comment
index 758bf5b6597860d73ca062e8305c1430985e89ea..fe194f478d20bb3dc8c10d091726009ddafc4f87 100644 (file)
 struct Client;
 
 enum Feature {
 struct Client;
 
 enum Feature {
+  /* Misc. features */
   FEAT_LOG,
   FEAT_LOG,
+  FEAT_DOMAINNAME,
+  FEAT_RELIABLE_CLOCK,
+  FEAT_BUFFERPOOL,
+  FEAT_HAS_FERGUSON_FLUSHER,
+  FEAT_CLIENT_FLOOD,
+  FEAT_SERVER_PORT,
+  FEAT_NODEFAULTMOTD,
+  FEAT_KILL_IPMISMATCH,
+  FEAT_IDLE_FROM_MSG,
+  FEAT_HUB,
+  FEAT_WALLOPS_OPER_ONLY,
+
+  /* Some misc. default paths */
+  FEAT_MPATH,
+  FEAT_RPATH,
+  FEAT_PPATH,
 
   /* Networking features */
 
   /* Networking features */
+  FEAT_VIRTUAL_HOST,
   FEAT_TOS_SERVER,
   FEAT_TOS_CLIENT,
 
   /* features that affect all operators */
   FEAT_TOS_SERVER,
   FEAT_TOS_CLIENT,
 
   /* features that affect all operators */
+  FEAT_CRYPT_OPER_PASSWORD,
   FEAT_OPER_NO_CHAN_LIMIT,
   FEAT_OPER_MODE_LCHAN,
   FEAT_OPER_WALK_THROUGH_LMODES,
   FEAT_OPER_NO_CHAN_LIMIT,
   FEAT_OPER_MODE_LCHAN,
   FEAT_OPER_WALK_THROUGH_LMODES,
index d982463eb34e132e292117a009a6878db7960e19..621d888512ecf7eb7678ca063cdef0da5c41bea8 100644 (file)
@@ -6,6 +6,10 @@
 #ifndef INCLUDED_querycmds_h
 #define INCLUDED_querycmds_h
 
 #ifndef INCLUDED_querycmds_h
 #define INCLUDED_querycmds_h
 
+#ifndef INCLUDED_ircd_features_h
+#include "ircd_features.h"     /* feature_str() */
+#endif
+
 struct Client;
 
 /*
 struct Client;
 
 /*
@@ -57,7 +61,7 @@ extern struct UserStatistics UserStats;
 #define Count_unknownbecomesclient(cptr, UserStats) \
   do { \
     --UserStats.unknowns; ++UserStats.local_clients; ++UserStats.clients; \
 #define Count_unknownbecomesclient(cptr, UserStats) \
   do { \
     --UserStats.unknowns; ++UserStats.local_clients; ++UserStats.clients; \
-    if (match("*" DOMAINNAME, cli_sockhost(cptr)) == 0) \
+    if (match(feature_str(FEAT_DOMAINNAME), cli_sockhost(cptr)) == 0) \
       ++current_load.local_count; \
     if (UserStats.local_clients > max_client_count) \
       max_client_count = UserStats.local_clients; \
       ++current_load.local_count; \
     if (UserStats.local_clients > max_client_count) \
       max_client_count = UserStats.local_clients; \
@@ -74,7 +78,7 @@ extern struct UserStatistics UserStats;
   do \
   { \
     --UserStats.local_clients; --UserStats.clients; \
   do \
   { \
     --UserStats.local_clients; --UserStats.clients; \
-    if (match("*" DOMAINNAME, cli_sockhost(cptr)) == 0) \
+    if (match(feature_str(FEAT_DOMAINNAME), cli_sockhost(cptr)) == 0) \
       --current_load.local_count; \
   } while(0)
 #define Count_serverdisconnects(UserStats)              do { --UserStats.local_servers; --UserStats.servers; } while(0)
       --current_load.local_count; \
   } while(0)
 #define Count_serverdisconnects(UserStats)              do { --UserStats.local_servers; --UserStats.servers; } while(0)
index a8c86ee073b9bd907ebae6e1308e27aa83574b1b..11d23a3cdc58d5067d4308e838b83019854fc249 100644 (file)
 #undef DOTERMCAP
 #endif
 
 #undef DOTERMCAP
 #endif
 
-#if defined(CLIENT_FLOOD)
-#if (CLIENT_FLOOD > 8000) || (CLIENT_FLOOD < 512)
-#error CLIENT_FLOOD needs redefining.
-#endif
-#else
-#error CLIENT_FLOOD undefined
-#endif
-
 #ifndef CONFIG_SETUGID
 #undef IRC_UID
 #undef IRC_GID
 #ifndef CONFIG_SETUGID
 #undef IRC_UID
 #undef IRC_GID
index fa1c980c34040215e04ffbe07b04bc72b6d032fc..0aa7445fa0fe7fefbbc8ed3b4f0dd1eef3c5cb92 100644 (file)
@@ -242,11 +242,11 @@ install: build
        @${RM} /tmp/ircd.tag
        ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} chkconf ${BINDIR}
        ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ../doc/example.conf ${DPATH}
        @${RM} /tmp/ircd.tag
        ${INSTALL} -s -m 700 -o ${IRCDOWN} -g ${IRCDGRP} chkconf ${BINDIR}
        ${INSTALL} -m 600 -o ${IRCDOWN} -g ${IRCDGRP} ../doc/example.conf ${DPATH}
-       ( cd ${DPATH}; \
-         ${TOUCH} ${MPATH}; \
-         ${TOUCH} ${RPATH}; \
-         ${CHOWN} ${IRCDOWN} ${MPATH} ${RPATH}; \
-         ${CHGRP} ${IRCDGRP} ${MPATH} ${RPATH}; )
+#      ( cd ${DPATH}; \
+#        ${TOUCH} ${MPATH}; \
+#        ${TOUCH} ${RPATH}; \
+#        ${CHOWN} ${IRCDOWN} ${MPATH} ${RPATH}; \
+#        ${CHGRP} ${IRCDGRP} ${MPATH} ${RPATH}; )
 
 uninstall:
        @if [ "${BINDIR}" != "${DPATH}" ]; then \
 
 uninstall:
        @if [ "${BINDIR}" != "${DPATH}" ]; then \
@@ -306,10 +306,11 @@ channel.o: channel.c ../include/channel.h ../config/config.h \
  ../include/ircd_log.h ../include/ircd_reply.h \
  ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \
  ../include/match.h ../include/msg.h ../include/numeric.h \
  ../include/ircd_log.h ../include/ircd_reply.h \
  ../include/ircd_snprintf.h ../include/ircd_string.h ../include/list.h \
  ../include/match.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/querycmds.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
- ../include/s_user.h ../include/send.h ../include/sprintf_irc.h \
- ../include/support.h ../include/sys.h ../include/whowas.h
+ ../include/numnicks.h ../include/querycmds.h \
+ ../include/ircd_features.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/support.h \
+ ../include/sys.h ../include/whowas.h
 class.o: class.c ../include/class.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
 class.o: class.c ../include/class.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
@@ -330,8 +331,9 @@ crule.o: crule.c ../include/crule.h ../include/client.h \
  ../include/fda.h ../include/ircd_chattr.h ../include/ircd_string.h \
  ../include/match.h ../include/s_bsd.h ../include/s_debug.h
 dbuf.o: dbuf.c ../include/dbuf.h ../include/ircd_alloc.h \
  ../include/fda.h ../include/ircd_chattr.h ../include/ircd_string.h \
  ../include/match.h ../include/s_bsd.h ../include/s_debug.h
 dbuf.o: dbuf.c ../include/dbuf.h ../include/ircd_alloc.h \
- ../include/fda.h ../include/ircd_chattr.h ../include/send.h \
- ../include/sys.h ../config/config.h ../config/setup.h
+ ../include/fda.h ../include/ircd_chattr.h ../include/ircd_features.h \
+ ../include/send.h ../include/sys.h ../config/config.h \
+ ../config/setup.h
 fda.o: fda.c
 fileio.o: fileio.c ../include/fileio.h ../include/ircd_alloc.h \
  ../include/fda.h
 fda.o: fda.c
 fileio.o: fileio.c ../include/fileio.h ../include/ircd_alloc.h \
  ../include/fda.h
@@ -356,28 +358,29 @@ ircd.o: ircd.c ../include/ircd.h ../config/config.h ../config/setup.h \
  ../include/class.h ../include/client.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/crule.h \
  ../include/hash.h ../include/ircd_alloc.h ../include/fda.h \
  ../include/class.h ../include/client.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/crule.h \
  ../include/hash.h ../include/ircd_alloc.h ../include/fda.h \
- ../include/ircd_log.h ../include/ircd_reply.h \
- ../include/ircd_signal.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/jupe.h ../include/list.h \
- ../include/match.h ../include/motd.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/parse.h \
- ../include/res.h ../include/s_auth.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
- ../include/send.h ../include/sys.h ../include/uping.h \
- ../include/userload.h ../include/version.h ../include/whowas.h
+ ../include/ircd_features.h ../include/ircd_log.h \
+ ../include/ircd_reply.h ../include/ircd_signal.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/jupe.h \
+ ../include/list.h ../include/match.h ../include/motd.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/parse.h ../include/res.h ../include/s_auth.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
+ ../include/s_misc.h ../include/send.h ../include/sys.h \
+ ../include/uping.h ../include/userload.h ../include/version.h \
+ ../include/whowas.h
 ircd_alloc.o: ircd_alloc.c ../include/ircd_alloc.h ../include/fda.h \
  ../include/ircd_string.h ../config/config.h ../config/setup.h \
  ../include/ircd_chattr.h ../include/s_debug.h ../include/ircd_defs.h
 ircd_alloc.o: ircd_alloc.c ../include/ircd_alloc.h ../include/fda.h \
  ../include/ircd_string.h ../config/config.h ../config/setup.h \
  ../include/ircd_chattr.h ../include/s_debug.h ../include/ircd_defs.h
-ircd_features.o: ircd_features.c ../include/ircd_features.h \
- ../include/client.h ../include/ircd_defs.h ../config/config.h \
- ../config/setup.h ../include/dbuf.h ../include/msgq.h \
- ../include/ircd_handler.h ../include/hash.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
- ../include/ircd_log.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
- ../include/msg.h ../include/numeric.h ../include/numnicks.h \
- ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \
- ../include/send.h ../include/support.h ../include/sys.h
+ircd_features.o: ircd_features.c ../config/config.h ../config/setup.h \
+ ../include/ircd_features.h ../include/client.h ../include/ircd_defs.h \
+ ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
+ ../include/hash.h ../include/ircd.h ../include/struct.h \
+ ../include/ircd_alloc.h ../include/fda.h ../include/ircd_log.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
+ ../include/numeric.h ../include/numnicks.h ../include/s_bsd.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/send.h \
+ ../include/support.h ../include/sys.h
 ircd_log.o: ircd_log.c ../include/ircd_log.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
 ircd_log.o: ircd_log.c ../include/ircd_log.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
@@ -436,11 +439,11 @@ listener.o: listener.c ../include/listener.h ../include/ircd_defs.h \
  ../include/client.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
  ../include/client.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
- ../include/fda.h ../include/ircd_osdep.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h \
- ../include/numeric.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_misc.h ../include/send.h ../include/sprintf_irc.h \
- ../include/sys.h
+ ../include/fda.h ../include/ircd_features.h ../include/ircd_osdep.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/numeric.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_misc.h ../include/send.h \
+ ../include/sprintf_irc.h ../include/sys.h
 m_admin.o: m_admin.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
 m_admin.o: m_admin.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
@@ -480,11 +483,12 @@ m_connect.o: m_connect.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/crule.h \
  ../include/hash.h ../include/ircd.h ../include/struct.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/crule.h \
  ../include/hash.h ../include/ircd.h ../include/struct.h \
- ../include/ircd_log.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h ../include/jupe.h \
- ../include/match.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_user.h ../include/send.h
+ ../include/ircd_features.h ../include/ircd_log.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/jupe.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/s_user.h \
+ ../include/send.h
 m_cprivmsg.o: m_cprivmsg.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
 m_cprivmsg.o: m_cprivmsg.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd_reply.h \
@@ -630,8 +634,9 @@ m_lusers.o: m_lusers.c ../include/client.h ../include/ircd_defs.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \
  ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_reply.h ../include/ircd_string.h \
  ../include/ircd_chattr.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/querycmds.h ../include/s_user.h \
- ../include/s_serv.h ../include/send.h
+ ../include/numnicks.h ../include/querycmds.h \
+ ../include/ircd_features.h ../include/s_user.h ../include/s_serv.h \
+ ../include/send.h
 m_map.o: m_map.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
 m_map.o: m_map.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
@@ -639,7 +644,7 @@ m_map.o: m_map.c ../include/client.h ../include/ircd_defs.h \
  ../include/ircd_snprintf.h ../include/ircd_string.h \
  ../include/ircd_chattr.h ../include/list.h ../include/match.h \
  ../include/numeric.h ../include/s_user.h ../include/s_serv.h \
  ../include/ircd_snprintf.h ../include/ircd_string.h \
  ../include/ircd_chattr.h ../include/list.h ../include/match.h \
  ../include/numeric.h ../include/s_user.h ../include/s_serv.h \
- ../include/send.h ../include/querycmds.h
+ ../include/send.h ../include/querycmds.h ../include/ircd_features.h
 m_mode.o: m_mode.c ../include/handlers.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
 m_mode.o: m_mode.c ../include/handlers.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
@@ -680,12 +685,13 @@ m_notice.o: m_notice.c ../include/client.h ../include/ircd_defs.h \
 m_oper.o: m_oper.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
 m_oper.o: m_oper.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
- ../include/ircd.h ../include/struct.h ../include/ircd_log.h \
- ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/ircd_xopen.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_user.h \
- ../include/s_misc.h ../include/send.h ../include/support.h
+ ../include/ircd.h ../include/struct.h ../include/ircd_features.h \
+ ../include/ircd_log.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h \
+ ../include/ircd_xopen.h ../include/msg.h ../include/numeric.h \
+ ../include/numnicks.h ../include/querycmds.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_user.h ../include/s_misc.h \
+ ../include/send.h ../include/support.h
 m_opmode.o: m_opmode.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/channel.h \
 m_opmode.o: m_opmode.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/channel.h \
@@ -721,7 +727,8 @@ m_pong.o: m_pong.c ../include/client.h ../include/ircd_defs.h \
 m_privmsg.o: m_privmsg.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
 m_privmsg.o: m_privmsg.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/ircd.h \
- ../include/struct.h ../include/ircd_chattr.h ../include/ircd_relay.h \
+ ../include/struct.h ../include/ircd_chattr.h \
+ ../include/ircd_features.h ../include/ircd_relay.h \
  ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \
  ../include/msg.h ../include/numeric.h ../include/send.h
 m_privs.o: m_privs.c ../include/client.h ../include/ircd_defs.h \
  ../include/ircd_reply.h ../include/ircd_string.h ../include/match.h \
  ../include/msg.h ../include/numeric.h ../include/send.h
 m_privs.o: m_privs.c ../include/client.h ../include/ircd_defs.h \
@@ -780,12 +787,13 @@ m_server.o: m_server.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_log.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_log.h \
- ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/jupe.h ../include/list.h \
- ../include/match.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/querycmds.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
- ../include/s_serv.h ../include/send.h ../include/userload.h
+ ../include/ircd_features.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/jupe.h \
+ ../include/list.h ../include/match.h ../include/msg.h \
+ ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \
+ ../include/s_bsd.h ../include/s_conf.h ../include/s_debug.h \
+ ../include/s_misc.h ../include/s_serv.h ../include/send.h \
+ ../include/userload.h
 m_set.o: m_set.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
 m_set.o: m_set.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
@@ -796,10 +804,11 @@ m_set.o: m_set.c ../include/client.h ../include/ircd_defs.h \
 m_settime.o: m_settime.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
 m_settime.o: m_settime.c ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
  ../include/msgq.h ../include/ircd_handler.h ../include/hash.h \
- ../include/ircd.h ../include/struct.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \
- ../include/msg.h ../include/numeric.h ../include/numnicks.h \
- ../include/s_user.h ../include/send.h
+ ../include/ircd.h ../include/struct.h ../include/ircd_features.h \
+ ../include/ircd_reply.h ../include/ircd_string.h \
+ ../include/ircd_chattr.h ../include/list.h ../include/msg.h \
+ ../include/numeric.h ../include/numnicks.h ../include/s_user.h \
+ ../include/send.h
 m_silence.o: m_silence.c ../include/channel.h ../config/config.h \
  ../config/setup.h ../include/ircd_defs.h ../include/client.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
 m_silence.o: m_silence.c ../include/channel.h ../config/config.h \
  ../config/setup.h ../include/ircd_defs.h ../include/client.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
@@ -925,10 +934,11 @@ motd.o: motd.c ../include/motd.h ../include/class.h \
  ../config/setup.h ../include/dbuf.h ../include/msgq.h \
  ../include/ircd_handler.h ../include/fileio.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
  ../config/setup.h ../include/dbuf.h ../include/msgq.h \
  ../include/ircd_handler.h ../include/fileio.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
- ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/match.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/s_conf.h \
- ../include/s_debug.h ../include/s_user.h ../include/send.h
+ ../include/ircd_features.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/match.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/s_conf.h ../include/s_debug.h ../include/s_user.h \
+ ../include/send.h
 msgq.o: msgq.c ../include/msgq.h ../include/ircd_defs.h \
  ../include/ircd_alloc.h ../include/fda.h ../include/ircd_snprintf.h \
  ../config/config.h ../config/setup.h ../include/s_debug.h
 msgq.o: msgq.c ../include/msgq.h ../include/ircd_defs.h \
  ../include/ircd_alloc.h ../include/fda.h ../include/ircd_snprintf.h \
  ../config/config.h ../config/setup.h ../include/s_debug.h
@@ -958,14 +968,15 @@ parse.o: parse.c ../include/parse.h ../include/client.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/channel.h ../include/handlers.h ../include/hash.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/channel.h ../include/handlers.h ../include/hash.h \
  ../include/ircd.h ../include/struct.h ../include/ircd_alloc.h \
- ../include/fda.h ../include/ircd_chattr.h ../include/ircd_reply.h \
- ../include/ircd_string.h ../include/msg.h ../include/numeric.h \
- ../include/numnicks.h ../include/opercmds.h ../include/querycmds.h \
- ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_debug.h ../include/s_misc.h ../include/s_numeric.h \
- ../include/s_user.h ../include/send.h ../include/sys.h \
- ../include/whocmds.h ../include/whowas.h
-querycmds.o: querycmds.c ../include/querycmds.h
+ ../include/fda.h ../include/ircd_chattr.h ../include/ircd_features.h \
+ ../include/ircd_reply.h ../include/ircd_string.h ../include/msg.h \
+ ../include/numeric.h ../include/numnicks.h ../include/opercmds.h \
+ ../include/querycmds.h ../include/res.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/s_numeric.h ../include/s_user.h ../include/send.h \
+ ../include/sys.h ../include/whocmds.h ../include/whowas.h
+querycmds.o: querycmds.c ../include/querycmds.h \
+ ../include/ircd_features.h
 random.o: random.c ../include/random.h ../config/config.h \
  ../config/setup.h
 res.o: res.c ../include/res.h ../include/client.h \
 random.o: random.c ../include/random.h ../config/config.h \
  ../config/setup.h
 res.o: res.c ../include/res.h ../include/client.h \
@@ -983,25 +994,25 @@ s_auth.o: s_auth.c ../include/s_auth.h ../config/config.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/IPcheck.h ../include/ircd.h ../include/struct.h \
  ../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/IPcheck.h ../include/ircd.h ../include/struct.h \
  ../include/ircd_alloc.h ../include/fda.h ../include/ircd_chattr.h \
- ../include/ircd_log.h ../include/ircd_osdep.h \
- ../include/ircd_string.h ../include/list.h ../include/numeric.h \
- ../include/querycmds.h ../include/res.h ../include/s_bsd.h \
- ../include/s_debug.h ../include/s_misc.h ../include/send.h \
- ../include/sprintf_irc.h ../include/sys.h
+ ../include/ircd_features.h ../include/ircd_log.h \
+ ../include/ircd_osdep.h ../include/ircd_string.h ../include/list.h \
+ ../include/numeric.h ../include/querycmds.h ../include/res.h \
+ ../include/s_bsd.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/sys.h
 s_bsd.o: s_bsd.c ../include/s_bsd.h ../config/config.h \
  ../config/setup.h ../include/client.h ../include/ircd_defs.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/IPcheck.h ../include/channel.h ../include/class.h \
 s_bsd.o: s_bsd.c ../include/s_bsd.h ../config/config.h \
  ../config/setup.h ../include/client.h ../include/ircd_defs.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/IPcheck.h ../include/channel.h ../include/class.h \
- ../include/hash.h ../include/ircd_log.h ../include/ircd_osdep.h \
- ../include/ircd_reply.h ../include/ircd_string.h \
- ../include/ircd_chattr.h ../include/ircd.h ../include/struct.h \
- ../include/list.h ../include/listener.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/packet.h \
- ../include/parse.h ../include/querycmds.h ../include/res.h \
- ../include/s_auth.h ../include/s_conf.h ../include/s_debug.h \
- ../include/s_misc.h ../include/s_user.h ../include/send.h \
- ../include/sprintf_irc.h ../include/support.h ../include/sys.h \
- ../include/uping.h ../include/version.h
+ ../include/hash.h ../include/ircd_log.h ../include/ircd_features.h \
+ ../include/ircd_osdep.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/ircd_chattr.h ../include/ircd.h \
+ ../include/struct.h ../include/list.h ../include/listener.h \
+ ../include/msg.h ../include/numeric.h ../include/numnicks.h \
+ ../include/packet.h ../include/parse.h ../include/querycmds.h \
+ ../include/res.h ../include/s_auth.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/support.h \
+ ../include/sys.h ../include/uping.h ../include/version.h
 s_conf.o: s_conf.c ../include/s_conf.h ../include/IPcheck.h \
  ../include/class.h ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
 s_conf.o: s_conf.c ../include/s_conf.h ../include/IPcheck.h \
  ../include/class.h ../include/client.h ../include/ircd_defs.h \
  ../config/config.h ../config/setup.h ../include/dbuf.h \
@@ -1038,10 +1049,10 @@ s_misc.o: s_misc.c ../include/s_misc.h ../include/IPcheck.h \
  ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \
  ../include/match.h ../include/msg.h ../include/numeric.h \
  ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
  ../include/ircd_string.h ../include/ircd_chattr.h ../include/list.h \
  ../include/match.h ../include/msg.h ../include/numeric.h \
  ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
- ../include/res.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_debug.h ../include/s_user.h ../include/send.h \
- ../include/sprintf_irc.h ../include/support.h ../include/sys.h \
- ../include/uping.h ../include/userload.h
+ ../include/ircd_features.h ../include/res.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_debug.h ../include/s_user.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/support.h \
+ ../include/sys.h ../include/uping.h ../include/userload.h
 s_numeric.o: s_numeric.c ../include/s_numeric.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
 s_numeric.o: s_numeric.c ../include/s_numeric.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
@@ -1058,10 +1069,10 @@ s_serv.o: s_serv.c ../include/s_serv.h ../include/IPcheck.h \
  ../include/ircd_snprintf.h ../include/ircd_xopen.h ../include/jupe.h \
  ../include/list.h ../include/match.h ../include/msg.h \
  ../include/numeric.h ../include/numnicks.h ../include/parse.h \
  ../include/ircd_snprintf.h ../include/ircd_xopen.h ../include/jupe.h \
  ../include/list.h ../include/match.h ../include/msg.h \
  ../include/numeric.h ../include/numnicks.h ../include/parse.h \
- ../include/querycmds.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_debug.h ../include/s_misc.h ../include/s_user.h \
- ../include/send.h ../include/sprintf_irc.h ../include/sys.h \
- ../include/userload.h
+ ../include/querycmds.h ../include/ircd_features.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
+ ../include/s_user.h ../include/send.h ../include/sprintf_irc.h \
+ ../include/sys.h ../include/userload.h
 s_stats.o: s_stats.c ../include/s_stats.h ../include/class.h \
  ../include/client.h ../include/ircd_defs.h ../config/config.h \
  ../config/setup.h ../include/dbuf.h ../include/msgq.h \
 s_stats.o: s_stats.c ../include/s_stats.h ../include/class.h \
  ../include/client.h ../include/ircd_defs.h ../config/config.h \
  ../config/setup.h ../include/dbuf.h ../include/msgq.h \
@@ -1077,16 +1088,16 @@ s_user.o: s_user.c ../include/s_user.h ../include/IPcheck.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/gline.h ../include/hash.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/gline.h ../include/hash.h ../include/ircd.h \
  ../include/struct.h ../include/ircd_alloc.h ../include/fda.h \
- ../include/ircd_chattr.h ../include/ircd_log.h \
- ../include/ircd_reply.h ../include/ircd_string.h ../include/list.h \
- ../include/match.h ../include/motd.h ../include/msg.h \
- ../include/numeric.h ../include/numnicks.h ../include/parse.h \
- ../include/querycmds.h ../include/random.h ../include/s_bsd.h \
- ../include/s_conf.h ../include/s_debug.h ../include/s_misc.h \
- ../include/s_serv.h ../include/send.h ../include/sprintf_irc.h \
- ../include/support.h ../include/supported.h ../include/sys.h \
- ../include/userload.h ../include/version.h ../include/whowas.h \
- ../include/handlers.h
+ ../include/ircd_chattr.h ../include/ircd_features.h \
+ ../include/ircd_log.h ../include/ircd_reply.h \
+ ../include/ircd_string.h ../include/list.h ../include/match.h \
+ ../include/motd.h ../include/msg.h ../include/numeric.h \
+ ../include/numnicks.h ../include/parse.h ../include/querycmds.h \
+ ../include/random.h ../include/s_bsd.h ../include/s_conf.h \
+ ../include/s_debug.h ../include/s_misc.h ../include/s_serv.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/support.h \
+ ../include/supported.h ../include/sys.h ../include/userload.h \
+ ../include/version.h ../include/whowas.h ../include/handlers.h
 send.o: send.c ../include/send.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/class.h ../include/client.h ../include/dbuf.h \
 send.o: send.c ../include/send.h ../include/channel.h \
  ../config/config.h ../config/setup.h ../include/ircd_defs.h \
  ../include/class.h ../include/client.h ../include/dbuf.h \
@@ -1117,8 +1128,9 @@ userload.o: userload.c ../include/userload.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/ircd.h ../include/struct.h ../include/msg.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
  ../include/ircd.h ../include/struct.h ../include/msg.h \
- ../include/numnicks.h ../include/querycmds.h ../include/s_misc.h \
- ../include/send.h ../include/sys.h
+ ../include/numnicks.h ../include/querycmds.h \
+ ../include/ircd_features.h ../include/s_misc.h ../include/send.h \
+ ../include/sys.h
 whocmds.o: whocmds.c ../include/whocmds.h ../config/config.h \
  ../config/setup.h ../include/channel.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
 whocmds.o: whocmds.c ../include/whocmds.h ../config/config.h \
  ../config/setup.h ../include/channel.h ../include/ircd_defs.h \
  ../include/client.h ../include/dbuf.h ../include/msgq.h \
@@ -1126,11 +1138,11 @@ whocmds.o: whocmds.c ../include/whocmds.h ../config/config.h \
  ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \
  ../include/ircd_string.h ../include/list.h ../include/match.h \
  ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \
  ../include/struct.h ../include/ircd_chattr.h ../include/ircd_reply.h \
  ../include/ircd_string.h ../include/list.h ../include/match.h \
  ../include/numeric.h ../include/numnicks.h ../include/querycmds.h \
- ../include/random.h ../include/s_bsd.h ../include/s_conf.h \
- ../include/s_misc.h ../include/s_user.h ../include/send.h \
- ../include/sprintf_irc.h ../include/support.h ../include/sys.h \
- ../include/userload.h ../include/version.h ../include/whowas.h \
- ../include/msg.h
+ ../include/ircd_features.h ../include/random.h ../include/s_bsd.h \
+ ../include/s_conf.h ../include/s_misc.h ../include/s_user.h \
+ ../include/send.h ../include/sprintf_irc.h ../include/support.h \
+ ../include/sys.h ../include/userload.h ../include/version.h \
+ ../include/whowas.h ../include/msg.h
 whowas.o: whowas.c ../include/whowas.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
 whowas.o: whowas.c ../include/whowas.h ../include/client.h \
  ../include/ircd_defs.h ../config/config.h ../config/setup.h \
  ../include/dbuf.h ../include/msgq.h ../include/ircd_handler.h \
index e2937b4fb47ed69de30497b2e2215496724bd726..d8c00a6489a06b17a5a2502af33b0417342a7625 100644 (file)
@@ -21,6 +21,7 @@
 #include "dbuf.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
 #include "dbuf.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
+#include "ircd_features.h"
 #include "send.h"
 #include "sys.h"       /* MIN */
 
 #include "send.h"
 #include "sys.h"       /* MIN */
 
@@ -69,7 +70,7 @@ static struct DBufBuffer *dbuf_alloc(void)
     dbufFreeList = db->next;
     ++DBufUsedCount;
   }
     dbufFreeList = db->next;
     ++DBufUsedCount;
   }
-  else if (DBufAllocCount * DBUF_SIZE < BUFFERPOOL) {
+  else if (DBufAllocCount * DBUF_SIZE < feature_int(FEAT_BUFFERPOOL)) {
     db = (struct DBufBuffer*) MyMalloc(sizeof(struct DBufBuffer));
     assert(0 != db);
     ++DBufAllocCount;
     db = (struct DBufBuffer*) MyMalloc(sizeof(struct DBufBuffer));
     assert(0 != db);
     ++DBufAllocCount;
@@ -147,27 +148,29 @@ int dbuf_put(struct DBuf *dyn, const char *buf, unsigned int length)
   for (; length > 0; h = &(db->next)) {
     if (0 == (db = *h)) {
       if (0 == (db = dbuf_alloc())) {
   for (; length > 0; h = &(db->next)) {
     if (0 == (db = *h)) {
       if (0 == (db = dbuf_alloc())) {
-#if defined(HAS_FERGUSON_FLUSHER)
-        /*
-         * from "Married With Children" episode were Al bought a REAL toilet
-         * on the black market because he was tired of the wimpy water
-         * conserving toilets they make these days --Bleep
-         */
-        /*
-         * Apparently this doesn't work, the server _has_ to
-         * dump a few clients to handle the load. A fully loaded
-         * server cannot handle a net break without dumping some
-         * clients. If we flush the connections here under a full
-         * load we may end up starving the kernel for mbufs and
-         * crash the machine
-         */
-        /*
-         * attempt to recover from buffer starvation before
-         * bailing this may help servers running out of memory
-         */
-        flush_connections(0);
-        if (0 == (db = dbuf_alloc()))
-#endif
+       if (feature_bool(FEAT_HAS_FERGUSON_FLUSHER)) {
+         /*
+          * from "Married With Children" episode were Al bought a REAL toilet
+          * on the black market because he was tired of the wimpy water
+          * conserving toilets they make these days --Bleep
+          */
+         /*
+          * Apparently this doesn't work, the server _has_ to
+          * dump a few clients to handle the load. A fully loaded
+          * server cannot handle a net break without dumping some
+          * clients. If we flush the connections here under a full
+          * load we may end up starving the kernel for mbufs and
+          * crash the machine
+          */
+         /*
+          * attempt to recover from buffer starvation before
+          * bailing this may help servers running out of memory
+          */
+         flush_connections(0);
+         db = dbuf_alloc();
+       }
+
+        if (0 == db)
           return dbuf_malloc_error(dyn);
       }
       dyn->tail = db;
           return dbuf_malloc_error(dyn);
       }
       dyn->tail = db;
index fc941dad9decb0a8cf121466435c5fdbc7b6a916..24d966de22ce7ff9ca73618cdc98bbfb7f42b10b 100644 (file)
@@ -26,6 +26,7 @@
 #include "crule.h"
 #include "hash.h"
 #include "ircd_alloc.h"
 #include "crule.h"
 #include "hash.h"
 #include "ircd_alloc.h"
+#include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_signal.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_signal.h"
@@ -163,14 +164,16 @@ static void outofmemory(void) {
 static void write_pidfile(void) {
   FILE *pidf;
 
 static void write_pidfile(void) {
   FILE *pidf;
 
-  if (!(pidf = fopen(PPATH, "w+"))) {
+  if (!(pidf = fopen(feature_str(FEAT_PPATH), "w+"))) {
     Debug((DEBUG_NOTICE, 
     Debug((DEBUG_NOTICE, 
-          "Error opening pid file \"%s\": %s", PPATH, strerror(errno)));
+          "Error opening pid file \"%s\": %s", feature_str(FEAT_PPATH),
+          strerror(errno)));
     return;
   }
     
   if (fprintf(pidf, "%5d\n", getpid()) < 5)
     return;
   }
     
   if (fprintf(pidf, "%5d\n", getpid()) < 5)
-    Debug((DEBUG_NOTICE, "Error writing to pid file %s", PPATH));
+    Debug((DEBUG_NOTICE, "Error writing to pid file %s",
+          feature_str(FEAT_PPATH)));
 
   fclose(pidf);
 }
 
   fclose(pidf);
 }
@@ -629,9 +632,7 @@ int main(int argc, char **argv) {
 
   /* Check paths for accessibility */
   if (!check_file_access(SPATH, 'S', X_OK) ||
 
   /* Check paths for accessibility */
   if (!check_file_access(SPATH, 'S', X_OK) ||
-      !check_file_access(configfile, 'C', R_OK) ||
-      !check_file_access(MPATH, 'M', R_OK) ||
-      !check_file_access(RPATH, 'R', R_OK))
+      !check_file_access(configfile, 'C', R_OK))
     return 4;
       
 #ifdef DEBUG
     return 4;
       
 #ifdef DEBUG
@@ -643,6 +644,7 @@ int main(int argc, char **argv) {
   daemon_init(thisServer.bootopt & BOOT_TTY);
 
   setup_signals();
   daemon_init(thisServer.bootopt & BOOT_TTY);
 
   setup_signals();
+  feature_mark(); /* initialize features... */
   log_init(*argv);
 
   set_nomem_handler(outofmemory);
   log_init(*argv);
 
   set_nomem_handler(outofmemory);
index 5c235383551b0a674ca4ed2a62efe80e12e750ef..7c8e9fb171159f69a02aaf5b9422a797ce51a3dd 100644 (file)
@@ -18,6 +18,7 @@
  *
  * $Id$
  */
  *
  * $Id$
  */
+#include "config.h"
 #include "ircd_features.h"
 #include "client.h"
 #include "hash.h"
 #include "ircd_features.h"
 #include "client.h"
 #include "hash.h"
@@ -189,6 +190,8 @@ typedef void (*feat_report_call)(struct Client*, int);
 #define FEAT_OPER   0x0100     /* set to display only to opers */
 #define FEAT_MYOPER 0x0200     /* set to display only to local opers */
 
 #define FEAT_OPER   0x0100     /* set to display only to opers */
 #define FEAT_MYOPER 0x0200     /* set to display only to local opers */
 
+#define FEAT_READ   0x1000     /* feature is read-only (for now, perhaps?) */
+
 static struct FeatureDesc {
   enum Feature    feat;    /* feature identifier */
   char*                   type;    /* string describing type */
 static struct FeatureDesc {
   enum Feature    feat;    /* feature identifier */
   char*                   type;    /* string describing type */
@@ -217,14 +220,33 @@ static struct FeatureDesc {
   { FEAT_ ## type, #type, FEAT_STR | (flags), 0, 0, 0, (v_str),                      \
     0, 0, 0, 0, 0, 0 }
 
   { FEAT_ ## type, #type, FEAT_STR | (flags), 0, 0, 0, (v_str),                      \
     0, 0, 0, 0, 0, 0 }
 
+  /* Misc. features */
   F_N(LOG, FEAT_MYOPER, feature_log_set, feature_log_reset, feature_log_get,
       log_feature_unmark, log_feature_mark, log_feature_report),
   F_N(LOG, FEAT_MYOPER, feature_log_set, feature_log_reset, feature_log_get,
       log_feature_unmark, log_feature_mark, log_feature_report),
+  F_S(DOMAINNAME, 0, DOMAINNAME),
+  F_B(RELIABLE_CLOCK, 0, 0),
+  F_I(BUFFERPOOL, 0, 27000000),
+  F_B(HAS_FERGUSON_FLUSHER, 0, 0),
+  F_I(CLIENT_FLOOD, 0, 1024),
+  F_I(SERVER_PORT, FEAT_OPER, 4400),
+  F_B(NODEFAULTMOTD, 0, 1),
+  F_B(KILL_IPMISMATCH, FEAT_OPER, 0),
+  F_B(IDLE_FROM_MSG, 0, 1),
+  F_B(HUB, 0, 0),
+  F_B(WALLOPS_OPER_ONLY, 0, 0),
+
+  /* Some misc. default paths */
+  F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd"),
+  F_S(RPATH, FEAT_CASE | FEAT_MYOPER, "remote.motd"),
+  F_S(PPATH, FEAT_CASE | FEAT_MYOPER | FEAT_READ, "ircd.pid"),
 
   /* Networking features */
 
   /* Networking features */
+  F_B(VIRTUAL_HOST, 0, 0),
   F_I(TOS_SERVER, 0, 0x08),
   F_I(TOS_CLIENT, 0, 0x08),
 
   /* features that affect all operators */
   F_I(TOS_SERVER, 0, 0x08),
   F_I(TOS_CLIENT, 0, 0x08),
 
   /* features that affect all operators */
+  F_B(CRYPT_OPER_PASSWORD, FEAT_MYOPER | FEAT_READ, 1),
   F_B(OPER_NO_CHAN_LIMIT, 0, 1),
   F_B(OPER_MODE_LCHAN, 0, 1),
   F_B(OPER_WALK_THROUGH_LMODES, 0, 0),
   F_B(OPER_NO_CHAN_LIMIT, 0, 1),
   F_B(OPER_MODE_LCHAN, 0, 1),
   F_B(OPER_WALK_THROUGH_LMODES, 0, 0),
@@ -307,6 +329,9 @@ feature_set(struct Client* from, const char* const* fields, int count)
     else
       log_write(LS_CONFIG, L_ERROR, 0, "Not enough fields in F line");
   } else if ((feat = feature_desc(from, fields[0]))) { /* find feature */
     else
       log_write(LS_CONFIG, L_ERROR, 0, "Not enough fields in F line");
   } else if ((feat = feature_desc(from, fields[0]))) { /* find feature */
+    if (from && feat->flags & FEAT_READ)
+      return send_reply(from, ERR_NOFEATURE, fields[0]);
+
     switch (feat->flags & FEAT_MASK) {
     case FEAT_NONE:
       if (feat->set && (i = (*feat->set)(from, fields + 1, count - 1))) {
     switch (feat->flags & FEAT_MASK) {
     case FEAT_NONE:
       if (feat->set && (i = (*feat->set)(from, fields + 1, count - 1))) {
@@ -414,6 +439,9 @@ feature_reset(struct Client* from, const char* const* fields, int count)
   if (count < 1) /* check arguments */
     need_more_params(from, "RESET");
   else if ((feat = feature_desc(from, fields[0]))) { /* get descriptor */
   if (count < 1) /* check arguments */
     need_more_params(from, "RESET");
   else if ((feat = feature_desc(from, fields[0]))) { /* get descriptor */
+    if (from && feat->flags & FEAT_READ)
+      return send_reply(from, ERR_NOFEATURE, fields[0]);
+
     switch (feat->flags & FEAT_MASK) {
     case FEAT_NONE: /* None... */
       if (feat->reset && (i = (*feat->reset)(from, fields + 1, count - 1))) {
     switch (feat->flags & FEAT_MASK) {
     case FEAT_NONE: /* None... */
       if (feat->reset && (i = (*feat->reset)(from, fields + 1, count - 1))) {
index d40c7f1dae22fa41a38bc26f09aa4c379ba41691..ab65f3b563e1c6d26a50609b9efb0ecddd18317a 100644 (file)
@@ -627,15 +627,15 @@ log_set_file(const char *subsys, const char *filename)
   if (!(desc = log_find(subsys)))
     return 2;
 
   if (!(desc = log_find(subsys)))
     return 2;
 
-  /* no change, don't go to the trouble of destroying and recreating */
-  if (desc->file && filename && !strcmp(desc->file->file, filename))
-    return 0;
-
   if (filename)
     desc->mark |= LOG_MARK_FILE; /* mark that file has been changed */
   else
     desc->mark &= ~LOG_MARK_FILE; /* file has been reset to defaults */
 
   if (filename)
     desc->mark |= LOG_MARK_FILE; /* mark that file has been changed */
   else
     desc->mark &= ~LOG_MARK_FILE; /* file has been reset to defaults */
 
+  /* no change, don't go to the trouble of destroying and recreating */
+  if (desc->file && filename && !strcmp(desc->file->file, filename))
+    return 0;
+
   /* debug log is special, since it has to be opened on fd 2 */
   if (desc->subsys == LS_DEBUG)
     return log_debug_file(filename);
   /* debug log is special, since it has to be opened on fd 2 */
   if (desc->subsys == LS_DEBUG)
     return log_debug_file(filename);
index 0330e4fa6a267024f5b3a432a902194a57a84610..cbc75bbef3254d4ed7706335200cf913daf1a7bc 100644 (file)
@@ -91,6 +91,7 @@
 #include "crule.h"
 #include "hash.h"
 #include "ircd.h"
 #include "crule.h"
 #include "hash.h"
 #include "ircd.h"
+#include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
@@ -327,7 +328,7 @@ int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return 0;
     }
   }
       return 0;
     }
   }
-  if (0 == port && 0 == (port = SERVER_PORT)) {
+  if (0 == port && 0 == (port = feature_int(FEAT_SERVER_PORT))) {
     sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: missing port number",
                  sptr);
     return 0;
     sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: missing port number",
                  sptr);
     return 0;
index e26b0d255f299bf32164688d7be75726894d8879..7f68d285787b75dba92def535bca38e03f27f0b4 100644 (file)
@@ -120,7 +120,6 @@ int m_ison(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   char*          name;
   char*          p = 0;
   struct MsgBuf* mb;
   char*          name;
   char*          p = 0;
   struct MsgBuf* mb;
-  int found1 = 0;
   int i;
 
   if (parc < 2)
   int i;
 
   if (parc < 2)
@@ -137,10 +136,8 @@ int m_ison(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
          msgq_clean(mb); /* then do another round */
          mb = msgq_make(sptr, rpl_str(RPL_ISON), cli_name(&me),
                         cli_name(sptr));
          msgq_clean(mb); /* then do another round */
          mb = msgq_make(sptr, rpl_str(RPL_ISON), cli_name(&me),
                         cli_name(sptr));
-         found1 = 0;
        }
        }
-       msgq_append(0, mb, "%s%s", found1 ? " " : "", cli_name(acptr));
-       found1++;
+       msgq_append(0, mb, "%s ", cli_name(acptr));
       }
     }
   }
       }
     }
   }
index b57c685e4af76c2b0df565dfc3616c3ba6e1239b..813e2b3c7c87b0a2626be818e107b3cf518b5647 100644 (file)
@@ -90,6 +90,7 @@
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
+#include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include <stdlib.h>
 #include <string.h>
 
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef CRYPT_OPER_PASSWORD
 int oper_password_match(const char* to_match, const char* passwd)
 {
   /*
 int oper_password_match(const char* to_match, const char* passwd)
 {
   /*
@@ -117,18 +117,14 @@ int oper_password_match(const char* to_match, const char* passwd)
    *
    * passwd may be NULL. Head it off at the pass...
    */
    *
    * passwd may be NULL. Head it off at the pass...
    */
-  if (to_match && passwd) {
-    const char *encr = ircd_crypt(to_match, passwd);
-    return (0 == strcmp(encr, passwd));
-  }
-  return 0;
-}
-#else
-int oper_password_match(const char* to_match, const char* passwd)
-{
-  return (to_match && passwd) ? (0 == strcmp(to_match, passwd)) : 0;
+  if (!to_match || !passwd)
+    return 0;
+
+  if (feature_bool(FEAT_CRYPT_OPER_PASSWORD))
+    to_match = ircd_crypt(to_match, passwd);
+
+  return (0 == strcmp(to_match, passwd));
 }
 }
-#endif
 
 /*
  * m_oper - generic message handler
 
 /*
  * m_oper - generic message handler
index a3a396c0e197fe1d098c20be9334b52efa8ff139..2aa19b86fdf787ce8925e86c1b7d0a0d1e3229ea 100644 (file)
@@ -90,6 +90,7 @@
 #include "client.h"
 #include "ircd.h"
 #include "ircd_chattr.h"
 #include "client.h"
 #include "ircd.h"
 #include "ircd_chattr.h"
+#include "ircd_features.h"
 #include "ircd_relay.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_relay.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
@@ -118,9 +119,8 @@ int m_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
   cli_flags(sptr) &= ~FLAGS_TS8;
 
 
   cli_flags(sptr) &= ~FLAGS_TS8;
 
-#ifdef IDLE_FROM_MSG
-  cli_user(sptr)->last = CurrentTime;
-#endif
+  if (feature_bool(FEAT_IDLE_FROM_MSG))
+    cli_user(sptr)->last = CurrentTime;
 
   if (parc < 2 || EmptyString(parv[1]))
     return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE);
 
   if (parc < 2 || EmptyString(parv[1]))
     return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE);
@@ -209,9 +209,8 @@ int mo_privmsg(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
   cli_flags(sptr) &= ~FLAGS_TS8;
 
 
   cli_flags(sptr) &= ~FLAGS_TS8;
 
-#ifdef IDLE_FROM_MSG
-  cli_user(sptr)->last = CurrentTime;
-#endif
+  if (feature_bool(FEAT_IDLE_FROM_MSG))
+    cli_user(sptr)->last = CurrentTime;
 
   if (parc < 2 || EmptyString(parv[1]))
     return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE);
 
   if (parc < 2 || EmptyString(parv[1]))
     return send_reply(sptr, ERR_NORECIPIENT, MSG_PRIVATE);
index 69f24a83ba9c51606759169e4ce9d4b6140349b3..796f839500412009c98b25c149cec644b27528e9 100644 (file)
@@ -91,6 +91,7 @@
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_log.h"
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_log.h"
+#include "ircd_features.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "jupe.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "jupe.h"
@@ -324,16 +325,7 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return exit_client_msg(cptr, cptr, &me,
           "Access denied. No conf line for server %s", cli_name(cptr));
     }
       return exit_client_msg(cptr, cptr, &me,
           "Access denied. No conf line for server %s", cli_name(cptr));
     }
-#ifdef CRYPT_LINK_PASSWORD
-    /* passwd may be NULL. Head it off at the pass... */
-    if (*(cli_passwd(cptr))) {
-      encr = ircd_crypt(cli_passwd(cptr), aconf->passed);
-    }
-    else
-      encr = "";
-#else
     encr = cli_passwd(cptr);
     encr = cli_passwd(cptr);
-#endif /* CRYPT_LINK_PASSWORD */
 
     if (*aconf->passwd && !!strcmp(aconf->passwd, encr)) {
       ++ServerStats->is_ref;
 
     if (*aconf->passwd && !!strcmp(aconf->passwd, encr)) {
       ++ServerStats->is_ref;
@@ -345,14 +337,14 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
     memset(cli_passwd(cptr), 0, sizeof(cli_passwd(cptr)));
 
 
     memset(cli_passwd(cptr), 0, sizeof(cli_passwd(cptr)));
 
-#ifndef HUB
-    for (i = 0; i <= HighestFd; i++)
-      if (LocalClientArray[i] && IsServer(LocalClientArray[i])) {
-        active_lh_line = 3;
-        LHcptr = 0;
-        break;
-      }
-#endif
+    if (!feature_bool(FEAT_HUB)) {
+      for (i = 0; i <= HighestFd; i++)
+       if (LocalClientArray[i] && IsServer(LocalClientArray[i])) {
+         active_lh_line = 3;
+         LHcptr = 0;
+         break;
+       }
+    }
   }
 
   /*
   }
 
   /*
@@ -702,65 +694,58 @@ int mr_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     SetServerYXX(cptr, cptr, parv[6]);
     if (start_timestamp > OLDEST_TS)
     {
     SetServerYXX(cptr, cptr, parv[6]);
     if (start_timestamp > OLDEST_TS)
     {
-#ifndef RELIABLE_CLOCK
-#ifdef TESTNET
-      sendto_opmask_butone(0, SNO_OLDSNO, "Debug: my start time: %Tu ; "
-                          "others start time: %Tu", cli_serv(&me)->timestamp,
-                          start_timestamp);
-      sendto_opmask_butone(0, SNO_OLDSNO, "Debug: receive time: %Tu ; "
-                          "received timestamp: %Tu ; difference %ld",
-                          recv_time, timestamp, timestamp - recv_time);
-#endif
-      if (start_timestamp < cli_serv(&me)->timestamp)
-      {
-        sendto_opmask_butone(0, SNO_OLDSNO, "got earlier start time: "
-                            "%Tu < %Tu", start_timestamp, cli_serv(&me)->timestamp);
-        cli_serv(&me)->timestamp = start_timestamp;
-        TSoffset += timestamp - recv_time;
-        sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
-                            (int)(timestamp - recv_time));
-      }
-      else if ((start_timestamp > cli_serv(&me)->timestamp) && IsUnknown(cptr))
-        cli_serv(cptr)->timestamp = TStime();
-
-      else if (timestamp != recv_time)
-      {
-        /*
-         * Equal start times, we have a collision.  Let the connected-to server
-         * decide. This assumes leafs issue more than half of the connection
-         * attempts.
-         */
-        if (IsUnknown(cptr))
-          cli_serv(cptr)->timestamp = TStime();
-        else if (IsHandshake(cptr))
-        {
-          sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
+      Debug((DEBUG_DEBUG, "My start time: %Tu; other's start time: %Tu",
+            cli_serv(&me)->timestamp, start_timestamp));
+      Debug((DEBUG_DEBUG, "Receive time: %Tu; received timestamp: %Tu; "
+            "difference %ld", recv_time, timestamp, timestamp - recv_time));
+      if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+       if (start_timestamp < cli_serv(&me)->timestamp)
+         cli_serv(&me)->timestamp = start_timestamp;
+       if (IsUnknown(cptr))
+         cli_serv(cptr)->timestamp = TStime();
+      } else {
+       if (start_timestamp < cli_serv(&me)->timestamp) {
+         sendto_opmask_butone(0, SNO_OLDSNO, "got earlier start time: "
+                              "%Tu < %Tu", start_timestamp,
+                              cli_serv(&me)->timestamp);
+         cli_serv(&me)->timestamp = start_timestamp;
+         TSoffset += timestamp - recv_time;
+         sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
                               (int)(timestamp - recv_time));
                               (int)(timestamp - recv_time));
-          TSoffset += timestamp - recv_time;
-        }
+       } else if ((start_timestamp > cli_serv(&me)->timestamp) &&
+                IsUnknown(cptr))
+         cli_serv(cptr)->timestamp = TStime();
+
+       else if (timestamp != recv_time) {
+         /*
+          * Equal start times, we have a collision.  Let the connected-to
+          * server decide. This assumes leafs issue more than half of the
+          * connection attempts.
+          */
+         if (IsUnknown(cptr))
+           cli_serv(cptr)->timestamp = TStime();
+         else if (IsHandshake(cptr)) {
+           sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
+                                (int)(timestamp - recv_time));
+           TSoffset += timestamp - recv_time;
+         }
+       }
       }
       }
-#else /* RELIABLE CLOCK IS TRUE, we _always_ use our own clock */
-      if (start_timestamp < cli_serv(&me)->timestamp)
-        cli_serv(&me)->timestamp = start_timestamp;
-      if (IsUnknown(cptr))
-        cli_serv(cptr)->timestamp = TStime();
-#endif
     }
 
     ret = server_estab(cptr, aconf, ajupe);
   }
   else
     ret = 0;
     }
 
     ret = server_estab(cptr, aconf, ajupe);
   }
   else
     ret = 0;
-#ifdef RELIABLE_CLOCK
-  if (abs(cli_serv(cptr)->timestamp - recv_time) > 30)
-  {
+
+  if (feature_bool(FEAT_RELIABLE_CLOCK) &&
+      abs(cli_serv(cptr)->timestamp - recv_time) > 30) {
     sendto_opmask_butone(0, SNO_OLDSNO, "Connected to a net with a "
                         "timestamp-clock difference of %Td seconds! "
                         "Used SETTIME to correct this.",
                         timestamp - recv_time);
     sendcmdto_one(&me, CMD_SETTIME, cptr, "%Tu :%s", TStime(), cli_name(&me));
   }
     sendto_opmask_butone(0, SNO_OLDSNO, "Connected to a net with a "
                         "timestamp-clock difference of %Td seconds! "
                         "Used SETTIME to correct this.",
                         timestamp - recv_time);
     sendcmdto_one(&me, CMD_SETTIME, cptr, "%Tu :%s", TStime(), cli_name(&me));
   }
-#endif
 
   return ret;
 }
 
   return ret;
 }
@@ -979,17 +964,7 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return exit_client_msg(cptr, cptr, &me,
                              "Access denied. No conf line for server %s", cli_name(cptr));
     }
       return exit_client_msg(cptr, cptr, &me,
                              "Access denied. No conf line for server %s", cli_name(cptr));
     }
-#ifdef CRYPT_LINK_PASSWORD
-    /* passwd may be NULL. Head it off at the pass... */
-    if (*(cli_passwd(cptr)))
-    {
-      encr = ircd_crypt(cli_passwd(cptr), cli_passwd(aconf));
-    }
-    else
-      encr = "";
-#else
     encr = cli_passwd(cptr);
     encr = cli_passwd(cptr);
-#endif /* CRYPT_LINK_PASSWORD */
 
     if (*(aconf->passwd) && !!strcmp(aconf->passwd, encr)) {
       ++ServerStats->is_ref;
 
     if (*(aconf->passwd) && !!strcmp(aconf->passwd, encr)) {
       ++ServerStats->is_ref;
@@ -1000,14 +975,14 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     }
     memset(cli_passwd(cptr), 0, sizeof(cli_passwd(cptr)));
 
     }
     memset(cli_passwd(cptr), 0, sizeof(cli_passwd(cptr)));
 
-#ifndef HUB
-    for (i = 0; i <= HighestFd; i++)
-      if (LocalClientArray[i] && IsServer(LocalClientArray[i])) {
-        active_lh_line = 3;
-        LHcptr = 0;
-        break;
-      }
-#endif
+    if (!feature_bool(FEAT_HUB)) {
+      for (i = 0; i <= HighestFd; i++)
+       if (LocalClientArray[i] && IsServer(LocalClientArray[i])) {
+         active_lh_line = 3;
+         LHcptr = 0;
+         break;
+       }
+    }
   }
 
   /*
   }
 
   /*
@@ -1353,64 +1328,57 @@ int ms_server(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     SetServerYXX(cptr, cptr, parv[6]);
     if (start_timestamp > OLDEST_TS)
     {
     SetServerYXX(cptr, cptr, parv[6]);
     if (start_timestamp > OLDEST_TS)
     {
-#ifndef RELIABLE_CLOCK
-#ifdef TESTNET
-      sendto_opmask_butone(0, SNO_OLDSNO, "Debug: my start time: %Tu ; "
-                          "others start time: %Tu", cli_serv(&me)->timestamp,
-                          start_timestamp);
-      sendto_opmask_butone(0, SNO_OLDSNO, "Debug: receive time: %Tu ; "
-                          "received timestamp: %Tu ; difference %ld",
-                          recv_time, timestamp, timestamp - recv_time);
-#endif
-      if (start_timestamp < cli_serv(&me)->timestamp)
-      {
-        sendto_opmask_butone(0, SNO_OLDSNO, "got earlier start time: "
-                            "%Tu < %Tu", start_timestamp, cli_serv(&me)->timestamp);
-        cli_serv(&me)->timestamp = start_timestamp;
-        TSoffset += timestamp - recv_time;
-        sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
-                            (int)(timestamp - recv_time));
-      }
-      else if ((start_timestamp > cli_serv(&me)->timestamp) && IsUnknown(cptr))
-        cli_serv(cptr)->timestamp = TStime();
-
-      else if (timestamp != recv_time)
-      {
-        /*
-         * Equal start times, we have a collision.  Let the connected-to server
-         * decide. This assumes leafs issue more than half of the connection
-         * attempts.
-         */
-        if (IsUnknown(cptr))
-          cli_serv(cptr)->timestamp = TStime();
-        else if (IsHandshake(cptr))
-        {
-          sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
+      Debug((DEBUG_DEBUG, "My start time: %Tu; other's start time: %Tu",
+            cli_serv(&me)->timestamp, start_timestamp));
+      Debug((DEBUG_DEBUG, "Receive time: %Tu; received timestamp: %Tu; "
+            "difference %ld", recv_time, timestamp, timestamp - recv_time));
+      if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+       if (start_timestamp < cli_serv(&me)->timestamp)
+         cli_serv(&me)->timestamp = start_timestamp;
+       if (IsUnknown(cptr))
+         cli_serv(cptr)->timestamp = TStime();
+      } else {
+       if (start_timestamp < cli_serv(&me)->timestamp) {
+         sendto_opmask_butone(0, SNO_OLDSNO, "got earlier start time: "
+                              "%Tu < %Tu", start_timestamp,
+                              cli_serv(&me)->timestamp);
+         cli_serv(&me)->timestamp = start_timestamp;
+         TSoffset += timestamp - recv_time;
+         sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
                               (int)(timestamp - recv_time));
                               (int)(timestamp - recv_time));
-          TSoffset += timestamp - recv_time;
-        }
+       } else if ((start_timestamp > cli_serv(&me)->timestamp) &&
+                  IsUnknown(cptr))
+         cli_serv(cptr)->timestamp = TStime();
+
+       else if (timestamp != recv_time) {
+         /*
+          * Equal start times, we have a collision.  Let the connected-to
+          * server decide. This assumes leafs issue more than half of the
+          * connection attempts.
+          */
+         if (IsUnknown(cptr))
+           cli_serv(cptr)->timestamp = TStime();
+         else if (IsHandshake(cptr)) {
+           sendto_opmask_butone(0, SNO_OLDSNO, "clock adjusted by adding %d",
+                                (int)(timestamp - recv_time));
+           TSoffset += timestamp - recv_time;
+         }
+       }
       }
       }
-#else /* RELIABLE CLOCK IS TRUE, we _always_ use our own clock */
-      if (start_timestamp < cli_serv(&me)->timestamp)
-        cli_serv(&me)->timestamp = start_timestamp;
-      if (IsUnknown(cptr))
-        cli_serv(cptr)->timestamp = TStime();
-#endif
     }
 
     ret = server_estab(cptr, aconf, ajupe);
   }
   else
     ret = 0;
     }
 
     ret = server_estab(cptr, aconf, ajupe);
   }
   else
     ret = 0;
-#ifdef RELIABLE_CLOCK
-  if (abs(cli_serv(cptr)->timestamp - recv_time) > 30)
-  {
+
+  if (feature_bool(FEAT_RELIABLE_CLOCK) &&
+      abs(cli_serv(cptr)->timestamp - recv_time) > 30) {
     sendto_opmask_butone(0, SNO_OLDSNO, "Connected to a net with a "
                         "timestamp-clock difference of %Td seconds! Used "
                         "SETTIME to correct this.", timestamp - recv_time);
     sendcmdto_one(&me, CMD_SETTIME, cptr, "%Tu :%s", TStime(), cli_name(&me));
   }
     sendto_opmask_butone(0, SNO_OLDSNO, "Connected to a net with a "
                         "timestamp-clock difference of %Td seconds! Used "
                         "SETTIME to correct this.", timestamp - recv_time);
     sendcmdto_one(&me, CMD_SETTIME, cptr, "%Tu :%s", TStime(), cli_name(&me));
   }
-#endif
 
   return ret;
 }
 
   return ret;
 }
index a75a3c00fc3ebc77438cc5774299f74497b74fb2..08b5d6e8c888899a5d4d1a7f456e3c2011326f55 100644 (file)
@@ -90,6 +90,7 @@
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
 #include "client.h"
 #include "hash.h"
 #include "ircd.h"
+#include "ircd_features.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "list.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "list.h"
@@ -137,10 +138,11 @@ int ms_settime(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
   if (IsServer(sptr))           /* send to unlagged servers */
   {
 
   if (IsServer(sptr))           /* send to unlagged servers */
   {
-#ifdef RELIABLE_CLOCK
-    sprintf_irc(tbuf, TIME_T_FMT, TStime());
-    parv[1] = tbuf;
-#endif
+    if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+      sprintf_irc(tbuf, TIME_T_FMT, TStime());
+      parv[1] = tbuf;
+    }
+
     for (lp = cli_serv(&me)->down; lp; lp = lp->next)
       if (cptr != lp->value.cptr && MsgQLength(&(cli_sendQ(lp->value.cptr))) < 8000)
        sendcmdto_one(sptr, CMD_NOTICE, lp->value.cptr, "%s", parv[1]);
     for (lp = cli_serv(&me)->down; lp; lp = lp->next)
       if (cptr != lp->value.cptr && MsgQLength(&(cli_sendQ(lp->value.cptr))) < 8000)
        sendcmdto_one(sptr, CMD_NOTICE, lp->value.cptr, "%s", parv[1]);
@@ -154,28 +156,27 @@ int ms_settime(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return 0;
   }
 
       return 0;
   }
 
-#ifdef RELIABLE_CLOCK
-  if ((dt > 600) || (dt < -600))
-    sendcmdto_serv_butone(&me, CMD_WALLOPS, 0, ":Bad SETTIME from %s: %Tu",
-                         cli_name(sptr), t);
-  if (IsUser(sptr))
-  {
-    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is not set %ld seconds %s "
-                 ": RELIABLE_CLOCK is defined", sptr, (dt < 0) ? -dt : dt,
-                 (dt < 0) ? "forwards" : "backwards");
-  }
-#else
-  sendto_opmask_butone(0, SNO_OLDSNO, "SETTIME from %s, clock is set %ld "
-                      "seconds %s", cli_name(sptr), (dt < 0) ? -dt : dt,
-                      (dt < 0) ? "forwards" : "backwards");
-  TSoffset -= dt;
-  if (IsUser(sptr))
-  {
-    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is set %ld seconds %s",
-                 sptr, (dt < 0) ? -dt : dt,
-                 (dt < 0) ? "forwards" : "backwards");
+  if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+    if ((dt > 600) || (dt < -600))
+      sendcmdto_serv_butone(&me, CMD_WALLOPS, 0, ":Bad SETTIME from %s: %Tu",
+                           cli_name(sptr), t);
+    if (IsUser(sptr)) {
+      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is not set %ld "
+                   "seconds %s : RELIABLE_CLOCK is defined", sptr,
+                   (dt < 0) ? -dt : dt, (dt < 0) ? "forwards" : "backwards");
+    }
+  } else {
+    sendto_opmask_butone(0, SNO_OLDSNO, "SETTIME from %s, clock is set %ld "
+                        "seconds %s", cli_name(sptr), (dt < 0) ? -dt : dt,
+                        (dt < 0) ? "forwards" : "backwards");
+    TSoffset -= dt;
+    if (IsUser(sptr)) {
+      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is set %ld seconds %s",
+                   sptr, (dt < 0) ? -dt : dt,
+                   (dt < 0) ? "forwards" : "backwards");
+    }
   }
   }
-#endif
+
   return 0;
 }
 
   return 0;
 }
 
@@ -213,10 +214,11 @@ int mo_settime(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
   if (IsServer(sptr))           /* send to unlagged servers */
   {
 
   if (IsServer(sptr))           /* send to unlagged servers */
   {
-#ifdef RELIABLE_CLOCK
-    sprintf_irc(tbuf, TIME_T_FMT, TStime());
-    parv[1] = tbuf;
-#endif
+    if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+      sprintf_irc(tbuf, TIME_T_FMT, TStime());
+      parv[1] = tbuf;
+    }
+
     for (lp = cli_serv(&me)->down; lp; lp = lp->next)
       if (cptr != lp->value.cptr && MsgQLength(&(cli_sendQ(lp->value.cptr))) < 8000)
        sendcmdto_one(sptr, CMD_SETTIME, lp->value.cptr, "%s", parv[1]);
     for (lp = cli_serv(&me)->down; lp; lp = lp->next)
       if (cptr != lp->value.cptr && MsgQLength(&(cli_sendQ(lp->value.cptr))) < 8000)
        sendcmdto_one(sptr, CMD_SETTIME, lp->value.cptr, "%s", parv[1]);
@@ -230,28 +232,27 @@ int mo_settime(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
       return 0;
   }
 
       return 0;
   }
 
-#ifdef RELIABLE_CLOCK
-  if ((dt > 600) || (dt < -600))
-    sendcmdto_serv_butone(&me, CMD_WALLOPS, 0, ":Bad SETTIME from %s: %Tu",
-                         cli_name(sptr), t);
-  if (IsUser(sptr))
-  {
-    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is not set %ld seconds %s "
-                 ": RELIABLE_CLOCK is defined", sptr, (dt < 0) ? -dt : dt,
-                 (dt < 0) ? "forwards" : "backwards");
-  }
-#else
-  sendto_opmask_butone(0, SNO_OLDSNO, "SETTIME from %s, clock is set %ld "
-                      "seconds %s", cli_name(sptr), (dt < 0) ? -dt : dt,
-                      (dt < 0) ? "forwards" : "backwards");
-  TSoffset -= dt;
-  if (IsUser(sptr))
-  {
-    sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is set %ld seconds %s",
-                 sptr, (dt < 0) ? -dt : dt,
-                 (dt < 0) ? "forwards" : "backwards");
+  if (feature_bool(FEAT_RELIABLE_CLOCK)) {
+    if ((dt > 600) || (dt < -600))
+      sendcmdto_serv_butone(&me, CMD_WALLOPS, 0, ":Bad SETTIME from %s: %Tu",
+                           cli_name(sptr), t);
+    if (IsUser(sptr)) {
+      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is not set %ld "
+                   "seconds %s : RELIABLE_CLOCK is defined", sptr,
+                   (dt < 0) ? -dt : dt, (dt < 0) ? "forwards" : "backwards");
+    }
+  } else {
+    sendto_opmask_butone(0, SNO_OLDSNO, "SETTIME from %s, clock is set %ld "
+                        "seconds %s", cli_name(sptr), (dt < 0) ? -dt : dt,
+                        (dt < 0) ? "forwards" : "backwards");
+    TSoffset -= dt;
+    if (IsUser(sptr)) {
+      sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :clock is set %ld seconds %s",
+                   sptr, (dt < 0) ? -dt : dt,
+                   (dt < 0) ? "forwards" : "backwards");
+    }
   }
   }
-#endif
+
   return 0;
 }
 
   return 0;
 }
 
index acf1cecddc109b7666e641cfb03092b57451a100..2dc5daaafc497eb11a756ab6b72e3a09b5bfc112 100644 (file)
@@ -29,6 +29,7 @@
 #include "fileio.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "fileio.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
+#include "ircd_features.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "match.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "match.h"
@@ -258,18 +259,18 @@ motd_signon(struct Client* cptr)
 
   cache = motd_cache(motd_lookup(cptr));
 
 
   cache = motd_cache(motd_lookup(cptr));
 
-#ifdef NODEFAULTMOTD
-  send_reply(cptr, RPL_MOTDSTART, cli_name(&me));
-  send_reply(cptr, SND_EXPLICIT | RPL_MOTD, ":\002Type /MOTD to read the AUP "
-            "before continuing using this service.\002");
-  send_reply(cptr, SND_EXPLICIT | RPL_MOTD, ":The message of the day was last "
-            "changed: %d-%d-%d %d:%d", cache->modtime.tm_year + 1900,
-            cache->modtime.tm_mon + 1, cache->modtime.tm_mday,
-            cache->modtime.tm_hour, cache->modtime.tm_min);
-  send_reply(cptr, RPL_ENDOFMOTD);
-#else
-  motd_forward(cptr, cache);
-#endif
+  if (!feature_bool(FEAT_NODEFAULTMOTD))
+    motd_forward(cptr, cache);
+  else {
+    send_reply(cptr, RPL_MOTDSTART, cli_name(&me));
+    send_reply(cptr, SND_EXPLICIT | RPL_MOTD, ":\002Type /MOTD to read the "
+              "AUP before continuing using this service.\002");
+    send_reply(cptr, SND_EXPLICIT | RPL_MOTD, ":The message of the day was "
+              "last changed: %d-%d-%d %d:%d", cache->modtime.tm_year + 1900,
+              cache->modtime.tm_mon + 1, cache->modtime.tm_mday,
+              cache->modtime.tm_hour, cache->modtime.tm_min);
+    send_reply(cptr, RPL_ENDOFMOTD);
+  }
 }
 
 /* motd_recache causes all the MOTD caches to be cleared */
 }
 
 /* motd_recache causes all the MOTD caches to be cleared */
@@ -295,11 +296,11 @@ motd_recache(void)
 void
 motd_init(void)
 {
 void
 motd_init(void)
 {
-  MotdList.local = motd_create(0, MPATH, MOTD_MAXLINES); /* init local */
-  motd_cache(MotdList.local); /* and cache it */
+  MotdList.local = motd_create(0, feature_str(FEAT_MPATH), MOTD_MAXLINES);
+  motd_cache(MotdList.local); /* init local and cache it */
 
 
-  MotdList.remote = motd_create(0, RPATH, MOTD_MAXREMOTE); /* init remote */
-  motd_cache(MotdList.remote); /* and cache it */
+  MotdList.remote = motd_create(0, feature_str(FEAT_RPATH), MOTD_MAXREMOTE);
+  motd_cache(MotdList.remote); /* init remote and cache it */
 
   MotdList.other = 0; /* no T-lines processed yet */
 }
 
   MotdList.other = 0; /* no T-lines processed yet */
 }
index 921206c18de4dfa486a55a325977f0e9257e3d02..6bdca9951ff0b31e7a9cb06eecdfb6a94995e460 100644 (file)
  * just-disconnected-client aren't confused with just-connected ones.
  */
 
  * just-disconnected-client aren't confused with just-connected ones.
  */
 
-/*
- * Lets have *LOTS* of connections...
- */
-#define  EXTENDED_NUMERICS
 
 /* These must be the same on ALL servers ! Do not change ! */
 
 
 /* These must be the same on ALL servers ! Do not change ! */
 
 #define NUMNICKBASE 64          /* (2 << NUMNICKLOG) */
 #define NUMNICKMASK 63          /* (NUMNICKBASE-1) */
 #define NN_MAX_SERVER 4096      /* (NUMNICKBASE * NUMNICKBASE) */
 #define NUMNICKBASE 64          /* (2 << NUMNICKLOG) */
 #define NUMNICKMASK 63          /* (NUMNICKBASE-1) */
 #define NN_MAX_SERVER 4096      /* (NUMNICKBASE * NUMNICKBASE) */
-#if defined(EXTENDED_NUMERICS)
 #define NN_MAX_CLIENT 262144    /* NUMNICKBASE ^ 3 */
 #define NN_MAX_CLIENT 262144    /* NUMNICKBASE ^ 3 */
-#else
-#define NN_MAX_CLIENT 4096      /* (NUMNICKBASE * NUMNICKBASE) */
-#endif
 
 /*
  * The internal counter for the 'XX' of local clients
 
 /*
  * The internal counter for the 'XX' of local clients
@@ -244,11 +236,7 @@ void SetYXXCapacity(struct Client* c, unsigned int capacity)
     exit(-1);
   }
   --max_clients;
     exit(-1);
   }
   --max_clients;
-#if defined(EXTENDED_NUMERICS)
   inttobase64(cli_serv(c)->nn_capacity, max_clients, 3); 
   inttobase64(cli_serv(c)->nn_capacity, max_clients, 3); 
-#else
-  inttobase64(cli_serv(c)->nn_capacity, max_clients, 2); 
-#endif
   cli_serv(c)->nn_mask = max_clients;       /* Our Numeric Nick mask */
   cli_serv(c)->client_list = (struct Client**) MyCalloc(max_clients + 1, 
                                                      sizeof(struct Client*));
   cli_serv(c)->nn_mask = max_clients;       /* Our Numeric Nick mask */
   cli_serv(c)->client_list = (struct Client**) MyCalloc(max_clients + 1, 
                                                      sizeof(struct Client*));
@@ -260,12 +248,7 @@ void SetYXXServerName(struct Client* c, unsigned int numeric)
   assert(0 != c);
   assert(numeric < NN_MAX_SERVER);
 
   assert(0 != c);
   assert(numeric < NN_MAX_SERVER);
 
-#if defined(EXTENDED_NUMERICS)
   inttobase64(cli_yxx(c), numeric, 2);
   inttobase64(cli_yxx(c), numeric, 2);
-#else
-  assert(numeric < NUMNICKBASE);
-  (cli_yxx(c))[0] = convert2y[numeric];
-#endif
   if (numeric >= lastNNServer)
     lastNNServer = numeric + 1;
   server_list[numeric] = c;
   if (numeric >= lastNNServer)
     lastNNServer = numeric + 1;
   server_list[numeric] = c;
@@ -337,11 +320,7 @@ int SetLocalNumNick(struct Client *cptr)
   }
   client_list[last_nn & mask] = cptr;  /* Reserve the numeric ! */
 
   }
   client_list[last_nn & mask] = cptr;  /* Reserve the numeric ! */
 
-#if defined(EXTENDED_NUMERICS)
   inttobase64(cli_yxx(cptr), last_nn, 3);
   inttobase64(cli_yxx(cptr), last_nn, 3);
-#else
-  inttobase64(cli_yxx(cptr), last_nn, 2);
-#endif
   if (++last_nn == NN_MAX_CLIENT)
     last_nn = 0;
   return 1;
   if (++last_nn == NN_MAX_CLIENT)
     last_nn = 0;
   return 1;
index 3f78605dd2f518fd840bd5f2695175006674d501..152ef99d02797fbee893434da702cd837a4e1aa5 100644 (file)
@@ -27,6 +27,7 @@
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
+#include "ircd_features.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "msg.h"
@@ -353,11 +354,7 @@ struct Message msgtab[] = {
     TOK_OPER,
     0, MAXPARA, MFLG_SLOW, 0,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
     TOK_OPER,
     0, MAXPARA, MFLG_SLOW, 0,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
-#ifndef NOOPER    
     { m_unregistered, m_oper, ms_oper, mo_oper, m_ignore }
     { m_unregistered, m_oper, ms_oper, mo_oper, m_ignore }
-#else
-    { m_unregistered, m_oper, m_ignore, m_ignore, m_ignore }
-#endif
   },
   {
     MSG_CONNECT,
   },
   {
     MSG_CONNECT,
@@ -572,10 +569,6 @@ struct Message msgtab[] = {
 }; 
 
 
 }; 
 
 
-#ifdef GODMODE
-extern int sdbflag;
-#endif /* GODMODE */
-
 static char *para[MAXPARA + 2]; /* leave room for prefix and null */
 
 /*
 static char *para[MAXPARA + 2]; /* leave room for prefix and null */
 
 /*
@@ -920,10 +913,9 @@ int parse_client(struct Client *cptr, char *buffer, char *bufend)
   handler = mptr->handlers[cli_handler(cptr)];
   assert(0 != handler);
 
   handler = mptr->handlers[cli_handler(cptr)];
   assert(0 != handler);
 
-#ifndef IDLE_FROM_MSG
-  if (IsUser(cptr) && handler != m_ping && handler != m_ignore)
+  if (!feature_bool(FEAT_IDLE_FROM_MSG) && IsUser(cptr) &&
+      handler != m_ping && handler != m_ignore)
     cli_user(from)->last = CurrentTime;
     cli_user(from)->last = CurrentTime;
-#endif
 
   return (*handler) (cptr, from, i, para);
 }
 
   return (*handler) (cptr, from, i, para);
 }
index 9b1457bf7ca46cb3835a3aaeb746ba061fa0e172..00ecdab43258546cb664438843bce2db26dbeb73 100644 (file)
@@ -33,6 +33,7 @@
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
+#include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_osdep.h"
 #include "ircd_string.h"
 #include "ircd_log.h"
 #include "ircd_osdep.h"
 #include "ircd_string.h"
@@ -221,10 +222,10 @@ static void auth_dns_callback(void* vptr, struct DNSReply* reply)
       sendto_opmask_butone(0, SNO_IPMISMATCH, "IP# Mismatch: %s != %s[%s]",
                           cli_sock_ip(auth->client), hp->h_name, 
                           ircd_ntoa(hp->h_addr_list[0]));
       sendto_opmask_butone(0, SNO_IPMISMATCH, "IP# Mismatch: %s != %s[%s]",
                           cli_sock_ip(auth->client), hp->h_name, 
                           ircd_ntoa(hp->h_addr_list[0]));
-#if defined(KILL_IPMISMATCH)
-      auth_kill_client(auth);
-      return;
-#endif
+      if (feature_bool(FEAT_KILL_IPMISMATCH)) {
+       auth_kill_client(auth);
+       return;
+      }
     }
     else {
       ++reply->ref_count;
     }
     else {
       ++reply->ref_count;
index c9d6f76a4361f1496093867e9b83b07065ad68f7..6a5904f16d667a0e4b102ebacd6a3439cea0ca58 100644 (file)
@@ -26,6 +26,7 @@
 #include "class.h"
 #include "hash.h"
 #include "ircd_log.h"
 #include "class.h"
 #include "hash.h"
 #include "ircd_log.h"
+#include "ircd_features.h"
 #include "ircd_osdep.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_osdep.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
@@ -100,15 +101,6 @@ const char* const SOCKET_ERROR_MSG    = "error creating socket for %s: %s";
 const char* const TOS_ERROR_MSG              = "error setting TOS for %s: %s";
 
 
 const char* const TOS_ERROR_MSG              = "error setting TOS for %s: %s";
 
 
-#ifdef GODMODE
-#ifndef NODNS
-#define NODNS
-#endif
-#ifndef NOFLOODCONTROL
-#define NOFLOODCONTROL
-#endif
-#endif
-
 #if !defined(USE_POLL)
 #if FD_SETSIZE < (MAXCONNECTIONS + 4)
 /*
 #if !defined(USE_POLL)
 #if FD_SETSIZE < (MAXCONNECTIONS + 4)
 /*
@@ -260,17 +252,18 @@ static int connect_inet(struct ConfItem* aconf, struct Client* cptr)
    * leading to a freezing select() on this side for some time.
    * I had this on my Linux 1.1.88 --Run
    */
    * leading to a freezing select() on this side for some time.
    * I had this on my Linux 1.1.88 --Run
    */
-#ifdef VIRTUAL_HOST
+
   /*
    * No, we do bind it if we have virtual host support. If we don't
    * explicitly bind it, it will default to IN_ADDR_ANY and we lose
    * due to the other server not allowing our base IP --smg
    */
   /*
    * No, we do bind it if we have virtual host support. If we don't
    * explicitly bind it, it will default to IN_ADDR_ANY and we lose
    * due to the other server not allowing our base IP --smg
    */
-  if (bind(cli_fd(cptr), (struct sockaddr*) &VirtualHost, sizeof(VirtualHost))) {
+  if (feature_bool(FEAT_VIRTUAL_HOST) &&
+      bind(cli_fd(cptr), (struct sockaddr*) &VirtualHost,
+          sizeof(VirtualHost))) {
     report_error(BIND_ERROR_MSG, cli_name(cptr), errno);
     return 0;
   }
     report_error(BIND_ERROR_MSG, cli_name(cptr), errno);
     return 0;
   }
-#endif
 
   memset(&sin, 0, sizeof(sin));
   sin.sin_family      = AF_INET;
 
   memset(&sin, 0, sizeof(sin));
   sin.sin_family      = AF_INET;
@@ -633,7 +626,9 @@ static int read_packet(struct Client *cptr, int socket_ready)
   unsigned int dolen = 0;
   unsigned int length = 0;
 
   unsigned int dolen = 0;
   unsigned int length = 0;
 
-  if (socket_ready && !(IsUser(cptr) && DBufLength(&(cli_recvQ(cptr))) > CLIENT_FLOOD)) {
+  if (socket_ready &&
+      !(IsUser(cptr) &&
+       DBufLength(&(cli_recvQ(cptr))) > feature_int(FEAT_CLIENT_FLOOD))) {
     switch (os_recv_nonb(cli_fd(cptr), readbuf, sizeof(readbuf), &length)) {
     case IO_SUCCESS:
       if (length) {
     switch (os_recv_nonb(cli_fd(cptr), readbuf, sizeof(readbuf), &length)) {
     case IO_SUCCESS:
       if (length) {
@@ -668,18 +663,16 @@ static int read_packet(struct Client *cptr, int socket_ready)
     if (length > 0 && 0 == dbuf_put(&(cli_recvQ(cptr)), readbuf, length)) {
       return exit_client(cptr, cptr, &me, "dbuf_put fail");
     }
     if (length > 0 && 0 == dbuf_put(&(cli_recvQ(cptr)), readbuf, length)) {
       return exit_client(cptr, cptr, &me, "dbuf_put fail");
     }
-#ifndef NOFLOODCONTROL
+
     /*
      * XXX - cptr will always be a user or unregistered
      */
     /*
      * XXX - cptr will always be a user or unregistered
      */
-    if (IsUser(cptr) && DBufLength(&(cli_recvQ(cptr))) > CLIENT_FLOOD)
+    if (IsUser(cptr) &&
+       DBufLength(&(cli_recvQ(cptr))) > feature_int(FEAT_CLIENT_FLOOD))
       return exit_client(cptr, cptr, &me, "Excess Flood");
 
     while (DBufLength(&(cli_recvQ(cptr))) && !NoNewLine(cptr) && 
            (IsTrusted(cptr) || cli_since(cptr) - CurrentTime < 10))
       return exit_client(cptr, cptr, &me, "Excess Flood");
 
     while (DBufLength(&(cli_recvQ(cptr))) && !NoNewLine(cptr) && 
            (IsTrusted(cptr) || cli_since(cptr) - CurrentTime < 10))
-#else
-    while (DBufLength(&(cli_recvQ(cptr))) && !NoNewLine(cptr))
-#endif
     {
       /*
        * If it has become registered as a Server
     {
       /*
        * If it has become registered as a Server
index 06beff8ac31fde726c877181ede6e38e7efc265d..af30c217d50954d8eed710120546389fd2f6de45 100644 (file)
@@ -648,9 +648,6 @@ static struct ConfItem *find_conf_entry(struct ConfItem *aconf,
         (EmptyString(aconf->passwd) && !EmptyString(bconf->passwd)))
       continue;
     if (!EmptyString(bconf->passwd) && (!IsDigit(*bconf->passwd) || bconf->passwd[1])
         (EmptyString(aconf->passwd) && !EmptyString(bconf->passwd)))
       continue;
     if (!EmptyString(bconf->passwd) && (!IsDigit(*bconf->passwd) || bconf->passwd[1])
-#ifdef USEONE
-        && 0 != ircd_strcmp(bconf->passwd, "ONE")
-#endif
         && 0 != ircd_strcmp(bconf->passwd, aconf->passwd))
       continue;
 
         && 0 != ircd_strcmp(bconf->passwd, aconf->passwd))
       continue;
 
index 482e077413763a4a437527bb581af7680c0b076f..c28038aa3fbfbe7751b6c53130148c6d66d3173b 100644 (file)
@@ -59,28 +59,27 @@ static char serveropts[256]; /* should be large enough for anything */
 
 const char* debug_serveropts(void)
 {
 
 const char* debug_serveropts(void)
 {
+  int bp;
   int i = 0;
 #define AddC(c)        serveropts[i++] = (c)
 
   int i = 0;
 #define AddC(c)        serveropts[i++] = (c)
 
-#if BUFFERPOOL < 1000000
-  AddC('b');
-#if BUFFERPOOL > 99999
-  AddC((char)('0' + (BUFFERPOOL/100000)));
-#endif
-#if BUFFERPOOL > 9999
-  AddC((char)('0' + (BUFFERPOOL/10000) % 10));
-#endif
-  AddC((char)('0' + (BUFFERPOOL/1000) % 10));
-#else
-  AddC('B');
-#if BUFFERPOOL > 99999999
-  AddC((char)('0' + (BUFFERPOOL/100000000)));
-#endif
-#if BUFFERPOOL > 9999999
-  AddC((char)('0' + (BUFFERPOOL/10000000) % 10));
-#endif
-  AddC((char)('0' + (BUFFERPOOL/1000000) % 10));
-#endif
+  bp = feature_int(FEAT_BUFFERPOOL);
+  if (bp < 1000000) {
+    AddC('b');
+    if (bp > 99999)
+      AddC((char)('0' + (bp / 100000)));
+    if (bp > 9999)
+      AddC((char)('0' + (bp / 10000) % 10));
+    AddC((char)('0' + (bp / 1000) % 10));
+  } else {
+    AddC('B');
+    if (bp > 99999999)
+      AddC((char)('0' + (bp / 100000000)));
+    if (bp > 9999999)
+      AddC((char)('0' + (bp / 10000000) % 10));
+    AddC((char)('0' + (bp / 1000000) % 10));
+  }
+
 #ifdef  CHROOTDIR
   AddC('c');
 #endif
 #ifdef  CHROOTDIR
   AddC('c');
 #endif
@@ -103,9 +102,8 @@ const char* debug_serveropts(void)
   if (feature_bool(FEAT_OPER_MODE_LCHAN))
     AddC('f');
 
   if (feature_bool(FEAT_OPER_MODE_LCHAN))
     AddC('f');
 
-#ifdef  HUB
-  AddC('H');
-#endif
+  if (feature_bool(FEAT_HUB))
+    AddC('H');
 
   if (feature_bool(FEAT_SHOW_ALL_INVISIBLE_USERS))
     AddC('I');
 
   if (feature_bool(FEAT_SHOW_ALL_INVISIBLE_USERS))
     AddC('I');
@@ -122,25 +120,17 @@ const char* debug_serveropts(void)
   if (feature_bool(FEAT_OPER_WALK_THROUGH_LMODES))
     AddC('l');
 
   if (feature_bool(FEAT_OPER_WALK_THROUGH_LMODES))
     AddC('l');
 
-#ifdef  IDLE_FROM_MSG
-  AddC('M');
-#endif
-#ifdef  USEONE
-  AddC('O');
-#endif
+  if (feature_bool(FEAT_IDLE_FROM_MSG))
+    AddC('M');
 
   if (feature_bool(FEAT_NO_OPER_DEOP_LCHAN))
     AddC('o');
 
 
   if (feature_bool(FEAT_NO_OPER_DEOP_LCHAN))
     AddC('o');
 
-#ifdef  CRYPT_OPER_PASSWORD
-  AddC('p');
-#endif
-#ifdef  CRYPT_LINK_PASSWORD
-  AddC('P');
-#endif
-#ifdef  RELIABLE_CLOCK
-  AddC('R');
-#endif
+  if (feature_bool(FEAT_CRYPT_OPER_PASSWORD))
+    AddC('p');
+
+  if (feature_bool(FEAT_RELIABLE_CLOCK))
+    AddC('R');
 
   if (feature_bool(FEAT_LOCOP_RESTART))
     AddC('s');
 
   if (feature_bool(FEAT_LOCOP_RESTART))
     AddC('s');
@@ -151,9 +141,9 @@ const char* debug_serveropts(void)
 #if defined(USE_POLL) && defined(HAVE_POLL_H)
   AddC('U');
 #endif
 #if defined(USE_POLL) && defined(HAVE_POLL_H)
   AddC('U');
 #endif
-#ifdef  VIRTUAL_HOST
-  AddC('v');
-#endif
+
+  if (feature_bool(FEAT_VIRTUAL_HOST))
+    AddC('v');
 
   serveropts[i] = '\0';
 
 
   serveropts[i] = '\0';
 
index 6290bc02f695c23e63d1f960ef4c4179f345f9a0..b5a3a942f83c435ac4168fe35892d9ebf54d2652 100644 (file)
@@ -431,11 +431,7 @@ static Numeric replyTable[] = {
 /* 199 */
   { 0 },
 /* 200 */
 /* 199 */
   { 0 },
 /* 200 */
-#ifndef GODMODE
   { RPL_TRACELINK, "Link %s%s %s %s", "200" },
   { RPL_TRACELINK, "Link %s%s %s %s", "200" },
-#else /* GODMODE */
-  { RPL_TRACELINK, "Link %s%s %s %s " TIME_T_FMT, "200" },
-#endif /* GODMODE */
 /* 201 */
   { RPL_TRACECONNECTING, "Try. %d %s", "201" },
 /* 202 */
 /* 201 */
   { RPL_TRACECONNECTING, "Try. %d %s", "201" },
 /* 202 */
@@ -763,11 +759,7 @@ static Numeric replyTable[] = {
 /* 363 */
   { RPL_CLOSEEND, "%d :Connections Closed", "363" },
 /* 364 */
 /* 363 */
   { RPL_CLOSEEND, "%d :Connections Closed", "363" },
 /* 364 */
-#ifndef GODMODE
   { RPL_LINKS, "%s %s :%d P%u %s", "364" },
   { RPL_LINKS, "%s %s :%d P%u %s", "364" },
-#else /* GODMODE */
-  { RPL_LINKS, "%s %s :%d P%u " TIME_T_FMT " (%s) %s", "364" },
-#endif /* GODMODE */
 /* 365 */
   { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
 /* 366 */
 /* 365 */
   { RPL_ENDOFLINKS, "%s :End of /LINKS list.", "365" },
 /* 366 */
index 15393697c3da18fb20c5dd6409979b4946346483..f483a0ee7dd57ce696d9f431961295dd1ab24ca1 100644 (file)
@@ -32,6 +32,7 @@
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
+#include "ircd_features.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
 #include "ircd_log.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
@@ -1218,13 +1219,12 @@ int set_user_mode(struct Client *cptr, struct Client *sptr, int parc, char *parv
      */
     if (!(setflags & FLAGS_CHSERV))
       ClearChannelService(sptr);
      */
     if (!(setflags & FLAGS_CHSERV))
       ClearChannelService(sptr);
-#ifdef WALLOPS_OPER_ONLY
     /*
      * only send wallops to opers
      */
     /*
      * only send wallops to opers
      */
-    if (!IsAnOper(sptr) && !(setflags & FLAGS_WALLOP))
+    if (feature_bool(FEAT_WALLOPS_OPER_ONLY) && !IsAnOper(sptr) &&
+       !(setflags & FLAGS_WALLOP))
       ClearWallops(sptr);
       ClearWallops(sptr);
-#endif
   }
   if (MyConnect(sptr)) {
     if ((setflags & (FLAGS_OPER | FLAGS_LOCOP)) && !IsAnOper(sptr))
   }
   if (MyConnect(sptr)) {
     if ((setflags & (FLAGS_OPER | FLAGS_LOCOP)) && !IsAnOper(sptr))