diff options
Diffstat (limited to 'modules/commands/cs_ban.cpp')
-rw-r--r-- | modules/commands/cs_ban.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index b5b23f4a6..4bf0315bc 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -1,6 +1,6 @@ /* ChanServ core functions * - * (C) 2003-2023 Anope Team + * (C) 2003-2024 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. @@ -15,15 +15,15 @@ static Module *me; class TempBan : public Timer { - private: +private: Anope::string channel; Anope::string mask; Anope::string mode; - public: +public: TempBan(time_t seconds, Channel *c, const Anope::string &banmask, const Anope::string &mod) : Timer(me, seconds), channel(c->name), mask(banmask), mode(mod) { } - void Tick(time_t ctime) anope_override + void Tick(time_t ctime) override { Channel *c = Channel::Find(this->channel); if (c) @@ -33,14 +33,14 @@ class TempBan : public Timer class CommandCSBan : public Command { - public: +public: CommandCSBan(Module *creator) : Command(creator, "chanserv/ban", 2, 4) { this->SetDesc(_("Bans a given nick or mask on a channel")); this->SetSyntax(_("\037channel\037 [+\037expiry\037] {\037nick\037 | \037mask\037} [\037reason\037]")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { Configuration::Block *block = Config->GetCommand(source); const Anope::string &mode = block->Get<Anope::string>("mode", "BAN"); @@ -153,10 +153,10 @@ class CommandCSBan : public Command if (ci->HasExt("SIGNKICK") || (ci->HasExt("SIGNKICK_LEVEL") && !source.AccessFor(ci).HasPriv("SIGNKICK"))) { signkickformat = signkickformat.replace_all_cs("%m", reason); - c->Kick(ci->WhoSends(), u2, "%s", signkickformat.c_str()); + c->Kick(ci->WhoSends(), u2, signkickformat); } else - c->Kick(ci->WhoSends(), u2, "%s", reason.c_str()); + c->Kick(ci->WhoSends(), u2, reason); } } } @@ -208,7 +208,7 @@ class CommandCSBan : public Command { reason += " (Matches " + mask + ")"; signkickformat = signkickformat.replace_all_cs("%m", reason); - c->Kick(ci->WhoSends(), uc->user, "%s", signkickformat.c_str()); + c->Kick(ci->WhoSends(), uc->user, signkickformat); } else c->Kick(ci->WhoSends(), uc->user, "%s (Matches %s)", reason.c_str(), mask.c_str()); @@ -223,7 +223,7 @@ class CommandCSBan : public Command } } - bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override + bool OnHelp(CommandSource &source, const Anope::string &subcommand) override { this->SendSyntax(source); source.Reply(" "); @@ -241,7 +241,7 @@ class CSBan : public Module { CommandCSBan commandcsban; - public: +public: CSBan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandcsban(this) { me = this; |