X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_knock.cpp;h=8d2aa4543065be26e7b410ef41007c6d664cd37d;hb=ccd4c11ea1a43d079eaae9708482ef4a9148796c;hp=97eb0e005d2b8512ba24076c27b7a4db4d9af5e3;hpb=1b03dfaeec9b4e4668fe1c02af93ebf4e7f82f73;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 97eb0e005..8d2aa4543 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -95,9 +95,12 @@ class ModuleKnock : public Module 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);