public:
ModuleKnock() : cmd(this), kn(this)
{
- if (!ServerInstance->Modes->AddMode(&kn))
- throw ModuleException("Could not add new modes!");
- ServerInstance->AddCommand(&cmd);
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(kn);
+ ServerInstance->Modules->AddService(cmd);
ServerInstance->Modules->Attach(I_OnRehash, this);
OnRehash(NULL);