Esempio n. 1
0
    int		   v_int;   /**< integer value */
    int		   def_int; /**< default value */
    char*		   v_str;   /**< string value */
    char*		   def_str; /**< default value */
    feat_set_call	   set;	    /**< set feature values */
    feat_set_call	   reset;   /**< reset feature values to defaults */
    feat_get_call	   get;	    /**< get feature values */
    feat_notify_call notify;  /**< notify of value change */
    feat_unmark_call unmark;  /**< unmark all feature change values */
    feat_mark_call   mark;    /**< reset to defaults all unchanged features */
    feat_report_call report;  /**< report feature values */
} features[] = {
    /* Misc. features */
    F_N(LOG, FEAT_MYOPER, feature_log_set, feature_log_reset, feature_log_get,
    0, log_feature_unmark, log_feature_mark, log_feature_report),
    F_S(DOMAINNAME, 0, DOMAINNAME, 0),
    F_B(RELIABLE_CLOCK, 0, 0, 0),
    F_I(BUFFERPOOL, 0, 27000000, 0),
    F_B(HAS_FERGUSON_FLUSHER, 0, 0, 0),
    F_I(CLIENT_FLOOD, 0, 1024, 0),
    F_I(SERVER_PORT, FEAT_OPER, 4400, 0),
    F_B(NODEFAULTMOTD, 0, 1, 0),
    F_S(MOTD_BANNER, FEAT_NULL, 0, 0),
    F_S(PROVIDER, FEAT_NULL, 0, 0),
    F_B(KILL_IPMISMATCH, FEAT_OPER, 0, 0),
    F_B(IDLE_FROM_MSG, 0, 1, 0),
    F_B(HUB, 0, 0, feature_notify_hub),
    F_B(WALLOPS_OPER_ONLY, 0, 0, 0),
    F_B(NODNS, 0, 0, 0),
    F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0),
    F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default),
Esempio n. 2
0
/** Declare a feature that takes string values. */
#define F_S(type, flags, v_str, notify)					      \
  { FEAT_ ## type, #type, FEAT_STR | (flags), 0, 0, 0, (v_str),		      \
    0, 0, 0, (notify), 0, 0, 0 }
/** Declare a feature as an alias for another feature. */
#define F_A(type, alias)                                                      \
  { FEAT_ ## type, #type, FEAT_ALIAS, 0, FEAT_ ## alias, 0, 0,                \
    0, 0, 0, 0, 0, 0, 0 }
/** Declare a feature as deprecated. */
#define F_D(type)                                                             \
  { FEAT_ ## type, #type, FEAT_DEP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

  /* Misc. features */
  F_N(LOG, FEAT_MYOPER, feature_log_set, feature_log_reset, feature_log_get,
      0, log_feature_unmark, log_feature_mark, log_feature_report),
  F_S(DOMAINNAME, 0, "Nefarious.IRC", 0),
  F_B(RELIABLE_CLOCK, 0, 0, 0),
  F_I(BUFFERPOOL, 0, 27000000, 0),
  F_B(HAS_FERGUSON_FLUSHER, 0, 0, 0),
  F_I(CLIENT_FLOOD, 0, 1024, 0),
  F_I(SERVER_PORT, FEAT_OPER, 4400, 0),
  F_B(NODEFAULTMOTD, 0, 1, 0),
  F_S(MOTD_BANNER, FEAT_NULL, 0, 0),
  F_S(PROVIDER, FEAT_NULL, 0, 0),
  F_B(KILL_IPMISMATCH, FEAT_OPER, 0, 0),
  F_B(IDLE_FROM_MSG, 0, 1, 0),
  F_B(HUB, 0, 0, feature_notify_hub),
  F_B(WALLOPS_OPER_ONLY, 0, 0, 0),
  F_B(NODNS, 0, 0, 0),
  F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0),
  F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default),
Esempio n. 3
0
  int		   v_int;   /**< integer value */
  int		   def_int; /**< default value */
  char*		   v_str;   /**< string value */
  char*		   def_str; /**< default value */
  feat_set_call	   set;	    /**< set feature values */
  feat_set_call	   reset;   /**< reset feature values to defaults */
  feat_get_call	   get;	    /**< get feature values */
  feat_notify_call notify;  /**< notify of value change */
  feat_unmark_call unmark;  /**< unmark all feature change values */
  feat_mark_call   mark;    /**< reset to defaults all unchanged features */
  feat_report_call report;  /**< report feature values */
} features[] = {
  /* Misc. features */
  F_N(LOG, FEAT_MYOPER, feature_log_set, feature_log_reset, feature_log_get,
      0, log_feature_unmark, log_feature_mark, log_feature_report),
  F_S(DOMAINNAME, 0, DOMAINNAME, 0),
  F_B(RELIABLE_CLOCK, 0, 0, 0),
  F_I(BUFFERPOOL, 0, 27000000, 0),
  F_B(HAS_FERGUSON_FLUSHER, 0, 0, 0),
  F_I(CLIENT_FLOOD, 0, 1024, 0),
  F_I(SERVER_PORT, FEAT_OPER, 4400, 0),
  F_B(NODEFAULTMOTD, 0, 1, 0),
  F_S(MOTD_BANNER, FEAT_NULL, 0, 0),
  F_S(PROVIDER, FEAT_NULL, 0, 0),
  F_B(KILL_IPMISMATCH, FEAT_OPER, 0, 0),
  F_B(IDLE_FROM_MSG, 0, 1, 0),
  F_B(HUB, 0, 1, 0),
  F_B(WALLOPS_OPER_ONLY, 0, 0, 0),
  F_B(NODNS, 0, 0, 0),
  F_N(RANDOM_SEED, FEAT_NODISP, random_seed_set, 0, 0, 0, 0, 0, 0),
  F_S(DEFAULT_LIST_PARAM, FEAT_NULL, 0, list_set_default),