X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_blockcolor.cpp;h=3cc01b4c05bcc842f98f121e41da040ec5b366fa;hb=ccd4c11ea1a43d079eaae9708482ef4a9148796c;hp=19b5c9231456a7ad9127c54495c286dcc3908fba;hpb=c93af7582aed5f62e484550330697c634ba95f8b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index 19b5c9231..3cc01b4c0 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -35,16 +35,18 @@ class BlockColor : public SimpleChannelModeHandler class ModuleBlockColor : public Module { - bool AllowChanOps; BlockColor bc; public: ModuleBlockColor() : bc(this) { - if (!ServerInstance->Modes->AddMode(&bc)) - throw ModuleException("Could not add new modes!"); + } + + void init() + { + ServerInstance->Modules->AddService(bc); Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, 3); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual void On005Numeric(std::string &output)