X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_testnet.cpp;h=01d0406b06fe9c8267822eb3994641853f000a84;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=c2644dbff0149993aff974c194430f1f81f3ddc1;hpb=44f42a13de52c8025942ddab42f51feb36821782;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_testnet.cpp b/src/modules/m_testnet.cpp index c2644dbff..01d0406b0 100644 --- a/src/modules/m_testnet.cpp +++ b/src/modules/m_testnet.cpp @@ -152,8 +152,6 @@ static void checkall(Module* noimpl) CHK(OnEvent); CHK(OnGlobalOper); CHK(OnPostConnect); - CHK(OnAddBan); - CHK(OnDelBan); CHK(OnChangeLocalUserGECOS); CHK(OnUserRegister); CHK(OnChannelPreDelete); @@ -213,10 +211,14 @@ class ModuleTest : public Module CommandTest cmd; public: ModuleTest() : cmd(this) + { + } + + void init() { if (!strstr(ServerInstance->Config->ServerName.c_str(), ".test")) throw ModuleException("Don't load modules without reading their descriptions!"); - ServerInstance->AddCommand(&cmd); + ServerInstance->Modules->AddService(cmd); } Version GetVersion() @@ -226,4 +228,3 @@ class ModuleTest : public Module }; MODULE_INIT(ModuleTest) -