/* $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 -- SendMode doesn't distribute over the whole network */
return CMD_SUCCESS;