summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-03 01:19:14 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-03 01:19:14 +0000
commit7e03ab8b2a58f314267c9dc695d49f8d24a65685 (patch)
tree8b72321065df6cb2c3a9711c6f4b5e71294fa5b7 /src/modules
parent5b786e57d068f6dc3146f4abdf5808981b3cba1a (diff)
Fix this not working.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6481 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_devoice.cpp19
1 files 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);
}
-
+
};