* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
class CommandDevoice : public Command
{
public:
- CommandDevoice (InspIRCd* Instance) : Command(Instance,"DEVOICE", 0, 1)
+ CommandDevoice(Module* Creator) : Command(Creator,"DEVOICE", 1)
{
- this->source = "m_devoice.so";
syntax = "<channel>";
TRANSLATE2(TR_TEXT, TR_END);
}
modes.push_back(user->nick);
ServerInstance->SendMode(modes, ServerInstance->FakeClient);
-
- /* route it -- SendMode doesn't distribute over the whole network */
+ ServerInstance->PI->SendMode(c->name, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate());
return CMD_SUCCESS;
}
class ModuleDeVoice : public Module
{
- CommandDevoice *mycommand;
+ CommandDevoice cmd;
public:
- ModuleDeVoice(InspIRCd* Me) : Module(Me)
+ ModuleDeVoice() : cmd(this)
{
-
- mycommand = new CommandDevoice(ServerInstance);
- ServerInstance->AddCommand(mycommand);
-
+ ServerInstance->AddCommand(&cmd);
}
virtual ~ModuleDeVoice()
virtual Version GetVersion()
{
- return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("Provides voiced users with the ability to devoice themselves.", VF_VENDOR);
}
};