diff options
author | Sadie Powell <sadie@witchery.services> | 2020-02-18 17:49:32 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-02-18 18:56:14 +0000 |
commit | 2e0cc3684df72b2a8de45b354848af43c6b47606 (patch) | |
tree | 5fb6b9f587309746c2311e5e3043062523cdc122 /include/xline.h | |
parent | 5ddbcd3f56bb79a5dc6b693fc2c6ad7a46ba5a3c (diff) |
Generalise XLine stats numerics using RPL_STATS from aircd.
Diffstat (limited to 'include/xline.h')
-rw-r--r-- | include/xline.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/xline.h b/include/xline.h index 0aaa21a16..fe564358f 100644 --- a/include/xline.h +++ b/include/xline.h @@ -529,14 +529,15 @@ class CoreExport XLineManager */ void ApplyLines(); - /** Handle /STATS for a given type. - * NOTE: Any items in the list for this particular line type which have expired - * will be expired and removed before the list is displayed. - * @param type The type of stats to show - * @param numeric The numeric to give to each result line - * @param stats Stats context - */ - void InvokeStats(const std::string& type, unsigned int numeric, Stats::Context& stats); + /** DEPRECATED: use the `bool InvokeStats(const std::string&, Stats::Context&)` overload instead. */ + DEPRECATED_METHOD(void InvokeStats(const std::string& type, unsigned int numeric, Stats::Context& stats)); + + /** Generates a /STATS response for the given X-line type. + * @param type The type of X-line to look up. + * @param context The stats context to respond with. + * @return True if a response was sent; otherwise, false. + */ + bool InvokeStats(const std::string& type, Stats::Context& context); /** Expire X-lines which were added by the server configuration and have been removed. */ void ExpireRemovedConfigLines(const std::string& type, const insp::flat_set<std::string>& configlines); |