X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_blockcolor.cpp;h=3cc01b4c05bcc842f98f121e41da040ec5b366fa;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=90e3f912a9e9ce2f0066a27a0e3cab3405139852;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index 90e3f912a..3cc01b4c0 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -35,7 +35,6 @@ class BlockColor : public SimpleChannelModeHandler class ModuleBlockColor : public Module { - bool AllowChanOps; BlockColor bc; public: @@ -45,10 +44,9 @@ class ModuleBlockColor : public Module void init() { - if (!ServerInstance->Modes->AddMode(&bc)) - throw ModuleException("Could not add new modes!"); + 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)