From b263bd7202e0404e550ac4edfeb82519a91c56ce Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Apr 2008 22:42:11 +0000 Subject: Extra stuff for 005 numeric git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9341 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_quietban.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/modules/m_quietban.cpp b/src/modules/m_quietban.cpp index 01b2dd6df..8ea514220 100644 --- a/src/modules/m_quietban.cpp +++ b/src/modules/m_quietban.cpp @@ -21,7 +21,7 @@ class ModuleQuietBan : public Module public: ModuleQuietBan(InspIRCd* Me) : Module(Me) { - Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; ServerInstance->Modules->Attach(eventlist, this, 2); } @@ -61,6 +61,14 @@ class ModuleQuietBan : public Module return 0; } + + virtual void On005Numeric(std::string &output) + { + if (output.find(" EXTBAN=:") == std::string::npos) + output.append(" EXTBAN=:q"); + else + output.insert(output.find(" EXTBAN=:") + 8, "q"); + } }; -- cgit v1.2.3