-
- 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!");
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(m1);
+ ServerInstance->Modules->AddService(m2);
+ ServerInstance->Modules->AddService(m3);
+ ServerInstance->Modules->AddService(m4);
+ ServerInstance->Modules->AddService(m5);
+ ServerInstance->Modules->AddService(accountname);
+ 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, 9);
+ }
+
+ void On005Numeric(std::string &t)
+ {
+ ServerInstance->AddExtBanChar('R');