#include <stdlib.h>
#include <string.h>
+struct Client his;
+
/** List of log output types that can be set */
static struct LogTypes {
char *type; /**< Settable name. */
return 0;
}
+/** Handle an update to FEAT_HIS_SERVERNAME. */
+static void
+feature_notify_servername(void)
+{
+ ircd_strncpy(cli_name(&his), feature_str(FEAT_HIS_SERVERNAME), HOSTLEN);
+}
+
+/** Handle an update to FEAT_HIS_SERVERINFO. */
+static void
+feature_notify_serverinfo(void)
+{
+ ircd_strncpy(cli_info(&his), feature_str(FEAT_HIS_SERVERINFO), REALLEN);
+}
+
/** Report the value of a log setting.
* @param[in] from &Client asking for details.
* @param[in] fields Array of parameters to get.
F_S(HIDDEN_IP, 0, "127.0.0.1", 0),
F_B(CONNEXIT_NOTICES, 0, 0, 0),
F_B(OPLEVELS, 0, 1, 0),
+ F_B(ZANNELS, 0, 1, 0),
F_B(LOCAL_CHANNELS, 0, 1, 0),
F_B(TOPIC_BURST, 0, 0, 0),
+ F_B(DISABLE_GLINES, 0, 0, 0),
/* features that probably should not be touched */
F_I(KILLCHASETIMELIMIT, 0, 30, 0),
F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0),
F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0),
F_I(IPCHECK_CLONE_DELAY, 0, 600, 0),
+ F_I(CHANNELLEN, 0, 200, 0),
/* Some misc. default paths */
F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init),
F_B(HIS_MAP, 0, 1, 0),
F_B(HIS_LINKS, 0, 1, 0),
F_B(HIS_TRACE, 0, 1, 0),
- F_B(HIS_STATS_l, 0, 1, 0),
- F_B(HIS_STATS_L, 0, 1, 0),
F_B(HIS_STATS_a, 0, 1, 0),
F_B(HIS_STATS_c, 0, 1, 0),
- F_B(HIS_STATS_g, 0, 1, 0),
- F_B(HIS_STATS_h, 0, 1, 0),
- F_B(HIS_STATS_k, 0, 1, 0),
+ F_B(HIS_STATS_d, 0, 1, 0),
+ F_B(HIS_STATS_e, 0, 1, 0),
F_B(HIS_STATS_f, 0, 1, 0),
+ F_B(HIS_STATS_g, 0, 1, 0),
F_B(HIS_STATS_i, 0, 1, 0),
F_B(HIS_STATS_j, 0, 1, 0),
+ F_B(HIS_STATS_J, 0, 1, 0),
+ F_B(HIS_STATS_k, 0, 1, 0),
+ F_B(HIS_STATS_l, 0, 1, 0),
+ F_B(HIS_STATS_L, 0, 1, 0),
F_B(HIS_STATS_M, 0, 1, 0),
F_B(HIS_STATS_m, 0, 1, 0),
F_B(HIS_STATS_o, 0, 1, 0),
F_B(HIS_STATS_q, 0, 1, 0),
F_B(HIS_STATS_R, 0, 1, 0),
F_B(HIS_STATS_r, 0, 1, 0),
- F_B(HIS_STATS_d, 0, 1, 0),
- F_B(HIS_STATS_e, 0, 1, 0),
F_B(HIS_STATS_t, 0, 1, 0),
F_B(HIS_STATS_T, 0, 1, 0),
F_B(HIS_STATS_u, 0, 0, 0),
F_B(HIS_STATS_x, 0, 1, 0),
F_B(HIS_STATS_y, 0, 1, 0),
F_B(HIS_STATS_z, 0, 1, 0),
+ F_B(HIS_STATS_IAUTH, 0, 1, 0),
F_B(HIS_WHOIS_SERVERNAME, 0, 1, 0),
F_B(HIS_WHOIS_IDLETIME, 0, 1, 0),
F_B(HIS_WHOIS_LOCALCHAN, 0, 1, 0),
F_B(HIS_WHO_SERVERNAME, 0, 1, 0),
F_B(HIS_WHO_HOPCOUNT, 0, 1, 0),
+ F_B(HIS_MODEWHO, 0, 1, 0),
F_B(HIS_BANWHO, 0, 1, 0),
F_B(HIS_KILLWHO, 0, 1, 0),
F_B(HIS_REWRITE, 0, 1, 0),
F_I(HIS_REMOTE, 0, 1, 0),
F_B(HIS_NETSPLIT, 0, 1, 0),
- F_S(HIS_SERVERNAME, 0, "*.undernet.org", 0),
- F_S(HIS_SERVERINFO, 0, "The Undernet Underworld", 0),
+ F_S(HIS_SERVERNAME, 0, "*.undernet.org", feature_notify_servername),
+ F_S(HIS_SERVERINFO, 0, "The Undernet Underworld", feature_notify_serverinfo),
F_S(HIS_URLSERVERS, 0, "http://www.undernet.org/servers.php", 0),
/* Misc. random stuff */
F_S(NETWORK, 0, "UnderNet", 0),
F_S(URL_CLIENTS, 0, "ftp://ftp.undernet.org/pub/irc/clients", 0),
+ F_S(URLREG, 0, "http://cservice.undernet.org/live/", 0),
#undef F_S
#undef F_B
if (change && feat->notify) /* call change notify function */
(*feat->notify)();
+
+ if (from)
+ return feature_get(from, fields, count);
}
return 0;
if (change && feat->notify) /* call change notify function */
(*feat->notify)();
+
+ if (from)
+ return feature_get(from, fields, count);
}
return 0;
break;
}
}
+
+ cli_magic(&his) = CLIENT_MAGIC;
+ cli_status(&his) = STAT_SERVER;
+ feature_notify_servername();
+ feature_notify_serverinfo();
}
/** Report all F-lines to a user.