class CommandShun : public Command
{
public:
- CommandShun(InspIRCd* Me, Module* Creator) : Command(Me, Creator, "SHUN", "o", 1, 3)
+ CommandShun(Module* Creator) : Command(Creator, "SHUN", 1, 3)
{
- this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
+ flags_needed = 'o'; this->syntax = "<nick!user@hostmask> [<shun-duration>] :<reason>";
}
CmdResult Handle(const std::vector<std::string>& parameters, User *user)
{
if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user))
{
- ServerInstance->SNO->WriteToSnoMask('x',"%s Removed shun on %s.",user->nick.c_str(),target.c_str());
+ ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s",user->nick.c_str(),target.c_str());
}
else
{
{
if (!duration)
{
- ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent shun for %s: %s",
+ ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent SHUN for %s: %s",
user->nick.c_str(), target.c_str(), expr.c_str());
}
else
{
time_t c_requires_crap = duration + ServerInstance->Time();
- ServerInstance->SNO->WriteToSnoMask('x', "%s added timed shun for %s, expires on %s: %s",
+ ServerInstance->SNO->WriteToSnoMask('x', "%s added timed SHUN for %s to expire on %s: %s",
user->nick.c_str(), target.c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), expr.c_str());
}
bool affectopers;
public:
- ModuleShun(InspIRCd* Me) : Module(Me), cmd(Me, this), f(Me)
+ ModuleShun(InspIRCd* Me) : Module(Me), cmd(this), f(Me)
{
ServerInstance->XLines->RegisterFactory(&f);
ServerInstance->AddCommand(&cmd);