* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
class CommandSanick : public Command
{
public:
- CommandSanick (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SANICK", "o", 2, false, 0)
+ CommandSanick(Module* Creator) : Command(Creator,"SANICK", 2)
{
- syntax = "<nick> <new-nick>";
+ flags_needed = 'o'; Penalty = 0; syntax = "<nick> <new-nick>";
TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
}
{
std::string oldnick = user->nick;
std::string newnick = target->nick;
- if (target->ForceNickChange(parameters[1].c_str()))
+ if (target->ChangeNick(parameters[1], true))
{
- ServerInstance->SNO->WriteToSnoMask('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
- ServerInstance->PI->SendSNONotice("A", oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
+ ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
}
else
{
- ServerInstance->SNO->WriteToSnoMask('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
- ServerInstance->PI->SendSNONotice("A", oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
+ ServerInstance->SNO->WriteGlobalSno('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
}
}
{
CommandSanick cmd;
public:
- ModuleSanick(InspIRCd* Me)
- : Module(Me), cmd(Me, this)
+ ModuleSanick()
+ : cmd(this)
{
ServerInstance->AddCommand(&cmd);
}
virtual Version GetVersion()
{
- return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION);
+ return Version("Provides support for SANICK command", VF_OPTCOMMON | VF_VENDOR);
}
};