X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_knock.cpp;h=8d2aa4543065be26e7b410ef41007c6d664cd37d;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=ef3b617cda1b3822883e7d38c3701902f9837f59;hpb=ac7defcd3e52695dcf5e5150e9fe3e1624205e64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index ef3b617cd..8d2aa4543 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -99,9 +99,8 @@ class ModuleKnock : public Module void init() { - if (!ServerInstance->Modes->AddMode(&kn)) - throw ModuleException("Could not add new modes!"); - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(kn); + ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->Attach(I_OnRehash, this); OnRehash(NULL);