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)