]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/stats.h
Split ServerEventListener into {Broadcast,Link,Sync}EventListener.
[user/henk/code/inspircd.git] / include / modules / stats.h
index d2f6eabbb89f01d4f5c3781ac337d7a3b119ac08..e69070c9f65355dedbf41267faf2648323ccf88a 100644 (file)
 
 #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: