-
- m1 = new AChannel_R(ServerInstance);
- m2 = new AChannel_M(ServerInstance);
- m3 = new AUser_R(ServerInstance);
- if (!ServerInstance->AddMode(m1, 'R') || !ServerInstance->AddMode(m2, 'M') || !ServerInstance->AddMode(m3, 'R'))
- throw ModuleException("Could not add new modes!");
+ ServiceProvider* providerlist[] = { &m1, &m2, &m3, &m4, &m5, &accountname };
+ ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*));
+ Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, I_OnCheckBan,
+ I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick, I_OnSetConnectClass };
+
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
+ }
+
+ void On005Numeric(std::string &t)
+ {
+ ServerInstance->AddExtBanChar('R');
+ ServerInstance->AddExtBanChar('U');