/* $ModDesc: Provides voiced users with the ability to devoice themselves. */
#include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
/** Handle /DEVOICE
*/
{
this->source = "m_devoice.so";
syntax = "<channel>";
+ TRANSLATE2(TR_TEXT, TR_END);
}
CmdResult Handle (const char** parameters, int pcnt, userrec *user)
modes[1] = "-v";
modes[2] = user->nick;
- userrec* n = new userrec(ServerInstance);
- n->SetFd(FD_MAGIC_NUMBER);
- ServerInstance->SendMode(modes,3,n);
- delete n;
+ ServerInstance->SendMode(modes, 3, ServerInstance->FakeClient);
- /* route it */
+ /* route it -- SendMode doesn't distribute over the whole network */
return CMD_SUCCESS;
}
virtual Version GetVersion()
{
- return Version(1, 1, 0, 0, VF_VENDOR, API_VERSION);
+ return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
}
};
-MODULE_INIT(ModuleDeVoice);
+MODULE_INIT(ModuleDeVoice)