From 7e03ab8b2a58f314267c9dc695d49f8d24a65685 Mon Sep 17 00:00:00 2001 From: peavey Date: Sat, 3 Feb 2007 01:19:14 +0000 Subject: Fix this not working. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6481 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_devoice.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index 9f7f211e8..8960995e8 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -25,7 +25,7 @@ #include "inspircd.h" /** Handle /DEVOICE - */ + */ class cmd_devoice : public command_t { public: @@ -45,7 +45,10 @@ class cmd_devoice : public command_t modes[1] = "-v"; modes[2] = user->nick; - ServerInstance->SendMode(modes,3,user); + userrec* n = new userrec(ServerInstance); + n->SetFd(FD_MAGIC_NUMBER); + ServerInstance->SendMode(modes,3,n); + delete n; return CMD_SUCCESS; } @@ -60,15 +63,15 @@ class ModuleDeVoice : public Module public: ModuleDeVoice(InspIRCd* Me) : Module::Module(Me) { - + mycommand = new cmd_devoice(ServerInstance); ServerInstance->AddCommand(mycommand); } - + virtual ~ModuleDeVoice() { } - + virtual Version GetVersion() { return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION); @@ -82,16 +85,16 @@ class ModuleDeVoiceFactory : public ModuleFactory ModuleDeVoiceFactory() { } - + ~ModuleDeVoiceFactory() { } - + virtual Module * CreateModule(InspIRCd* Me) { return new ModuleDeVoice(Me); } - + }; -- cgit v1.2.3