X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_stripcolor.cpp;h=fb5aa86fe6914f3b07272ca287ccce668e3fd496;hb=94afde43b086f092bf8128d76d418cb63840e8eb;hp=8ed4bb49b33b9b6ee313d95b47ceb20b7583d44b;hpb=b57c7f4e466f72fdd2ac3deca42caa1ea7748338;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 8ed4bb49b..fb5aa86fe 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-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -92,21 +92,19 @@ class ModuleStripColor : public Module usc = new UserStripColor(ServerInstance); csc = new ChannelStripColor(ServerInstance); - if (!ServerInstance->AddMode(usc, 'S') || !ServerInstance->AddMode(csc, 'S')) + if (!ServerInstance->AddMode(usc) || !ServerInstance->AddMode(csc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } - void Implements(char* List) - { - List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = 1; - } virtual ~ModuleStripColor() { ServerInstance->Modes->DelMode(usc); ServerInstance->Modes->DelMode(csc); - DELETE(usc); - DELETE(csc); + delete usc; + delete csc; } virtual void ReplaceLine(std::string &sentence)