X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=include%2Fmodules%2Fstats.h;h=e69070c9f65355dedbf41267faf2648323ccf88a;hb=87b1461e2a4710a38b32186c2582da9fe9bb3804;hp=b1e27b4e7205eceebaa3424b4ef7ee20ba47000d;hpb=761e6d75ba37b984998952940ed681e79e456142;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/modules/stats.h b/include/modules/stats.h index b1e27b4e7..e69070c9f 100644 --- a/include/modules/stats.h +++ b/include/modules/stats.h @@ -19,12 +19,30 @@ #pragma once +#include "event.h" + namespace Stats { class Context; + class EventListener; class Row; } +class Stats::EventListener : public Events::ModuleEventListener +{ + public: + EventListener(Module* mod) + : ModuleEventListener(mod, "event/stats") + { + } + + /** Called when the STATS command is executed. + * @param stats Context of the /STATS request, contains requesting user, list of answer rows etc. + * @return MOD_RES_DENY if the stats request has been fulfilled. Otherwise, MOD_RES_PASSTHRU. + */ + virtual ModResult OnStats(Stats::Context& stats) = 0; +}; + class Stats::Row : public Numeric::Numeric { public: @@ -167,6 +185,7 @@ class Stats::Context n.push(p5); n.push(p6); n.push(p7); + n.push(p8); AddRow(n); } };