summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/stats.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/modules/stats.h b/include/modules/stats.h
index d2f6eabbb..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: