X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fircd_features.c;h=f49539cbddf79257a6cdf7864364ebec76e2f3e0;hb=7fbb742f7d849cb57b23f2a76d90950174094719;hp=fa33160228642ac355535688eada3f35bd4e1094;hpb=f1acbdf96cb8c8094df4aaf8011b20c7332ba2d6;p=ircu2.10.12-pk.git diff --git a/ircd/ircd_features.c b/ircd/ircd_features.c index fa33160..f49539c 100644 --- a/ircd/ircd_features.c +++ b/ircd/ircd_features.c @@ -207,6 +207,17 @@ feature_log_get(struct Client* from, const char* const* fields, int count) } } +/** Update whether #me is a hub or not. + */ +static void +feature_notify_hub(void) +{ + if (feature_bool(FEAT_HUB)) + SetHub(&me); + else + ClearHub(&me); +} + /** Sets a feature to the given value. * @param[in] from Client trying to set parameters. * @param[in] fields Array of parameters to set. @@ -298,7 +309,7 @@ static struct FeatureDesc { 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, 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), @@ -312,6 +323,7 @@ static struct FeatureDesc { 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), @@ -407,6 +419,7 @@ static struct FeatureDesc { /* 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 @@ -588,6 +601,9 @@ feature_set(struct Client* from, const char* const* fields, int count) if (change && feat->notify) /* call change notify function */ (*feat->notify)(); + + if (from) + return feature_get(from, fields, count); } return 0; @@ -651,6 +667,9 @@ feature_reset(struct Client* from, const char* const* fields, int count) if (change && feat->notify) /* call change notify function */ (*feat->notify)(); + + if (from) + return feature_get(from, fields, count); } return 0;