X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_devoice.cpp;h=4dcca3d9d65346589a56f748c1bacd5069d7e678;hb=d54fd9b1e6b31f69332a9241b5f17330c0ad61e0;hp=713dc2788ddb59f9de1b1ae04865e642fae07cdf;hpb=1ff199172d2fd4fa8e7f29dbffd10c684e25e3a9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index 713dc2788..4dcca3d9d 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -26,15 +26,15 @@ using namespace std; #include #include "users.h" #include "channels.h" -#include "helperfuncs.h" #include "modules.h" +#include "inspircd.h" + -static Server *Srv; class cmd_devoice : public command_t { public: - cmd_devoice () : command_t("DEVOICE", 0, 1) + cmd_devoice (InspIRCd* Instance) : command_t(Instance,"DEVOICE", 0, 1) { this->source = "m_devoice.so"; syntax = ""; @@ -53,7 +53,7 @@ class cmd_devoice : public command_t modes[1] = "-v"; modes[2] = user->nick; - Srv->SendMode(modes,3,user); + ServerInstance->SendMode(modes,3,user); } }; @@ -61,12 +61,11 @@ class ModuleDeVoice : public Module { cmd_devoice *mycommand; public: - ModuleDeVoice(Server* Me) : Module::Module(Me) + ModuleDeVoice(InspIRCd* Me) : Module::Module(Me) { - log(DEBUG,"ModuleDeVoice constructor"); - Srv = Me; - mycommand = new cmd_devoice(); - Srv->AddCommand(mycommand); + + mycommand = new cmd_devoice(ServerInstance); + ServerInstance->AddCommand(mycommand); } virtual ~ModuleDeVoice() @@ -91,16 +90,15 @@ class ModuleDeVoiceFactory : public ModuleFactory { } - virtual Module * CreateModule(Server* Me) + virtual Module * CreateModule(InspIRCd* Me) { - log(DEBUG,"ModuleDevoiceFactory::CreateModule()"); return new ModuleDeVoice(Me); } }; -extern "C" void * crud_u_like( void ) +extern "C" void * init_module( void ) { return new ModuleDeVoiceFactory; }