summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_geoip.cpp6
-rw-r--r--src/modules/m_cban.cpp7
-rw-r--r--src/modules/m_dnsbl.cpp6
-rw-r--r--src/modules/m_filter.cpp4
-rw-r--r--src/modules/m_hideoper.cpp6
-rw-r--r--src/modules/m_rline.cpp8
-rw-r--r--src/modules/m_shun.cpp7
-rw-r--r--src/modules/m_spanningtree/main.cpp5
-rw-r--r--src/modules/m_spanningtree/main.h3
-rw-r--r--src/modules/m_svshold.cpp7
10 files changed, 42 insertions, 17 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp
index 35efc8d70..b6b0c3fa1 100644
--- a/src/modules/extra/m_geoip.cpp
+++ b/src/modules/extra/m_geoip.cpp
@@ -27,6 +27,7 @@
#include "inspircd.h"
#include "xline.h"
+#include "modules/stats.h"
// Fix warnings about the use of commas at end of enumerator lists on C++03.
#if defined __clang__
@@ -47,7 +48,7 @@ enum
RPL_WHOISCOUNTRY = 344
};
-class ModuleGeoIP : public Module, public Whois::EventListener
+class ModuleGeoIP : public Module, public Stats::EventListener, public Whois::EventListener
{
StringExtItem ext;
bool extban;
@@ -65,7 +66,8 @@ class ModuleGeoIP : public Module, public Whois::EventListener
public:
ModuleGeoIP()
- : Whois::EventListener(this)
+ : Stats::EventListener(this)
+ , Whois::EventListener(this)
, ext("geoip_cc", ExtensionItem::EXT_USER, this)
, extban(true)
, gi(NULL)
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 54b1e39ee..7235a8bef 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -22,6 +22,7 @@
#include "inspircd.h"
#include "xline.h"
+#include "modules/stats.h"
/** Holds a CBAN item
*/
@@ -140,13 +141,15 @@ class CommandCBan : public Command
}
};
-class ModuleCBan : public Module
+class ModuleCBan : public Module, public Stats::EventListener
{
CommandCBan mycommand;
CBanFactory f;
public:
- ModuleCBan() : mycommand(this)
+ ModuleCBan()
+ : Stats::EventListener(this)
+ , mycommand(this)
{
}
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 732717ff3..ab24873ce 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -24,6 +24,7 @@
#include "inspircd.h"
#include "xline.h"
#include "modules/dns.h"
+#include "modules/stats.h"
/* Class holding data for a single entry */
class DNSBLConfEntry : public refcountbase
@@ -220,7 +221,7 @@ class DNSBLResolver : public DNS::Request
}
};
-class ModuleDNSBL : public Module
+class ModuleDNSBL : public Module, public Stats::EventListener
{
std::vector<reference<DNSBLConfEntry> > DNSBLConfEntries;
dynamic_reference<DNS::Manager> DNS;
@@ -247,7 +248,8 @@ class ModuleDNSBL : public Module
}
public:
ModuleDNSBL()
- : DNS(this, "DNS")
+ : Stats::EventListener(this)
+ , DNS(this, "DNS")
, nameExt("dnsbl_match", ExtensionItem::EXT_USER, this)
, countExt("dnsbl_pending", ExtensionItem::EXT_USER, this)
{
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 8ad692971..d3d3ef218 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -25,6 +25,7 @@
#include "modules/regex.h"
#include "modules/server.h"
#include "modules/shun.h"
+#include "modules/stats.h"
enum FilterFlags
{
@@ -160,7 +161,7 @@ class CommandFilter : public Command
}
};
-class ModuleFilter : public Module, public ServerEventListener
+class ModuleFilter : public Module, public ServerEventListener, public Stats::EventListener
{
typedef insp::flat_set<std::string, irc::insensitive_swo> ExemptTargetSet;
@@ -302,6 +303,7 @@ bool ModuleFilter::AppliesToMe(User* user, FilterResult* filter, int iflags)
ModuleFilter::ModuleFilter()
: ServerEventListener(this)
+ , Stats::EventListener(this)
, initing(true)
, filtcommand(this)
, RegexEngine(this, "regex")
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 2e0b388cf..6ecfc6074 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -20,6 +20,7 @@
#include "inspircd.h"
+#include "modules/stats.h"
/** Handles user mode +H
*/
@@ -48,13 +49,14 @@ class HideOper : public SimpleUserModeHandler
}
};
-class ModuleHideOper : public Module, public Whois::LineEventListener
+class ModuleHideOper : public Module, public Stats::EventListener, public Whois::LineEventListener
{
HideOper hm;
bool active;
public:
ModuleHideOper()
- : Whois::LineEventListener(this)
+ : Stats::EventListener(this)
+ , Whois::LineEventListener(this)
, hm(this)
, active(false)
{
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 9bb1167f5..e3a84397f 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -22,6 +22,7 @@
#include "inspircd.h"
#include "modules/regex.h"
+#include "modules/stats.h"
#include "xline.h"
static bool ZlineOnMatch = false;
@@ -206,7 +207,7 @@ class CommandRLine : public Command
}
};
-class ModuleRLine : public Module
+class ModuleRLine : public Module, public Stats::EventListener
{
dynamic_reference<RegexFactory> rxfactory;
RLineFactory f;
@@ -217,7 +218,10 @@ class ModuleRLine : public Module
public:
ModuleRLine()
- : rxfactory(this, "regex"), f(rxfactory), r(this, f)
+ : Stats::EventListener(this)
+ , rxfactory(this, "regex")
+ , f(rxfactory)
+ , r(this, f)
, initing(true)
{
}
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp
index 5b0b42cae..92c0b0bd0 100644
--- a/src/modules/m_shun.cpp
+++ b/src/modules/m_shun.cpp
@@ -23,6 +23,7 @@
#include "inspircd.h"
#include "xline.h"
#include "modules/shun.h"
+#include "modules/stats.h"
/** An XLineFactory specialized to generate shun pointers
@@ -133,7 +134,7 @@ class CommandShun : public Command
}
};
-class ModuleShun : public Module
+class ModuleShun : public Module, public Stats::EventListener
{
CommandShun cmd;
ShunFactory f;
@@ -142,7 +143,9 @@ class ModuleShun : public Module
bool affectopers;
public:
- ModuleShun() : cmd(this)
+ ModuleShun()
+ : Stats::EventListener(this)
+ , cmd(this)
{
}
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 1a77237bd..2fd578698 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -37,7 +37,10 @@
#include "translate.h"
ModuleSpanningTree::ModuleSpanningTree()
- : rconnect(this), rsquit(this), map(this)
+ : Stats::EventListener(this)
+ , rconnect(this)
+ , rsquit(this)
+ , map(this)
, commands(this)
, currmembid(0)
, eventprov(this, "event/server")
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 4eefb01a0..5add15e8a 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -26,6 +26,7 @@
#include "inspircd.h"
#include "event.h"
#include "modules/dns.h"
+#include "modules/stats.h"
#include "servercommand.h"
#include "commands.h"
#include "protocolinterface.h"
@@ -52,7 +53,7 @@ class Autoconnect;
/** This is the main class for the spanningtree module
*/
-class ModuleSpanningTree : public Module
+class ModuleSpanningTree : public Module, public Stats::EventListener
{
/** Client to server commands, registered in the core
*/
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index 1ba16f3f4..481a1aaba 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -22,6 +22,7 @@
#include "inspircd.h"
#include "xline.h"
+#include "modules/stats.h"
namespace
{
@@ -161,14 +162,16 @@ class CommandSvshold : public Command
}
};
-class ModuleSVSHold : public Module
+class ModuleSVSHold : public Module, public Stats::EventListener
{
CommandSvshold cmd;
SVSHoldFactory s;
public:
- ModuleSVSHold() : cmd(this)
+ ModuleSVSHold()
+ : Stats::EventListener(this)
+ , cmd(this)
{
}