summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-10 18:58:54 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-10 18:58:54 +0000
commitc2bee07bc22ab254c78b0887319c36d183103ac5 (patch)
tree4bc0ad477c366e0449ec18d4d237997eadde4b8f /src/modules/extra
parent437e01747b15d01eb6851b9fad7ea7c21daff83b (diff)
Add /stats s
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5674 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_filter_pcre.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp
index a7829871f..0991c7def 100644
--- a/src/modules/extra/m_filter_pcre.cpp
+++ b/src/modules/extra/m_filter_pcre.cpp
@@ -149,6 +149,20 @@ class ModuleFilterPCRE : public FilterBase
}
}
}
+
+ virtual int OnStats(char symbol, userrec* user, string_list &results)
+ {
+ if (symbol == 's')
+ {
+ std::string sn = ServerInstance->Config->ServerName;
+ for (std::vector<PCREFilter>::iterator i = filters.begin(); i != filters.end(); i++)
+ {
+ results.push_back(sn+" 223 "+user->nick+" :"+i->freeform+" "+i->action+" "+ConvToStr(i->gline_time)+" :"+i->reason);
+ }
+ return 1;
+ }
+ return 0;
+ }
};