X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_stripcolor.cpp;h=8e2b0e8d9e5d2100c894fff513341c151b40a032;hb=00fa6d592ed2640fcdf74444786de555c1c3da25;hp=c3c274dfff0d8e0d35892b8dfe76974adbff1370;hpb=b3e3b1f14e12b4b0a395ef8e2a4848f132e2c22b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index c3c274dff..8e2b0e8d9 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team + * InspIRCd: (C) 2002-2009 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -46,11 +46,10 @@ class ModuleStripColor : public Module if (!ServerInstance->Modes->AddMode(usc) || !ServerInstance->Modes->AddMode(csc)) throw ModuleException("Could not add new modes!"); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; - ServerInstance->Modules->Attach(eventlist, this, 2); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 3); } - virtual ~ModuleStripColor() { ServerInstance->Modes->DelMode(usc); @@ -59,6 +58,11 @@ class ModuleStripColor : public Module delete csc; } + virtual void On005Numeric(std::string &output) + { + ServerInstance->AddExtBanChar('S'); + } + virtual void ReplaceLine(std::string &sentence) { /* refactor this completely due to SQUIT bug since the old code would strip last char and replace with \0 --peavey */ @@ -121,7 +125,7 @@ class ModuleStripColor : public Module return 0; } - active = t->IsModeSet('S'); + active = t->IsModeSet('S') || t->IsExtBanned(user, 'S'); } if (active) @@ -139,7 +143,7 @@ class ModuleStripColor : public Module virtual Version GetVersion() { - return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); } };