diff options
Diffstat (limited to 'modules/commands/bs_set.cpp')
-rw-r--r-- | modules/commands/bs_set.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index 784ea7f8b..95500ac94 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -48,7 +48,7 @@ class CommandBSSet : public Command } } source.Reply(_("Type \002%s%s HELP %s \037option\037\002 for more information on a\n" - "particular option."), Config->UseStrictPrivMsgString.c_str(), source.service->nick.c_str(), this_name.c_str()); + "particular option."), Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), this_name.c_str()); return true; } @@ -105,6 +105,10 @@ class CommandBSSetBanExpire : public Command } ci->banexpire = Anope::DoTime(arg); + + bool override = !access.HasPriv("SET"); + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to change banexpire to " << ci->banexpire; + if (!ci->banexpire) source.Reply(_("Bot bans will no longer automatically expire.")); else @@ -305,15 +309,13 @@ class CommandBSSetFantasy : public Command source.Reply(_(" \n" "Enables or disables \002fantasy\002 mode on a channel.\n" "When it is enabled, users will be able to use\n" - "%s commands on a channel when prefixed\n" + "fantasy commands on a channel when prefixed\n" "with one of the following fantasy characters: \002%s\002\n" " \n" "Note that users wanting to use fantaisist\n" - "commands MUST have enough level for both\n" - "the FANTASIA and another level depending\n" - "of the command if required (for example, to use\n" - "!op, user must have enough access for the OPDEOP\n" - "level)."), Config->ChanServ.c_str(), Config->BSFantasyCharacter.c_str()); + "commands MUST have enough access for both\n" + "the FANTASIA and the command they are executing."), + Config->GetModule("botserv")->Get<const Anope::string>("fantasycharacter", "!").c_str()); return true; } }; @@ -404,8 +406,7 @@ class CommandBSSetNoBot : public Command if (value.equals_ci("ON")) { - bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_ADMIN : LOG_COMMAND, source, this, ci) << "to enable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to enable nobot"; ci->ExtendMetadata("BS_NOBOT"); if (ci->bi) @@ -414,8 +415,7 @@ class CommandBSSetNoBot : public Command } else if (value.equals_ci("OFF")) { - bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_ADMIN : LOG_COMMAND, source, this, ci) << "to disable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to disable nobot"; ci->Shrink("BS_NOBOT"); source.Reply(_("No-bot mode is now \002off\002 on channel %s."), ci->name.c_str()); @@ -491,12 +491,10 @@ class BSSet : public Module CommandBSSetPrivate commandbssetprivate; public: - BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandbsset(this), commandbssetbanexpire(this), commandbssetdontkickops(this), commandbssetdontkickvoices(this), commandbssetfantasy(this), commandbssetgreet(this), commandbssetnobot(this), commandbssetprivate(this) { - this->SetAuthor("Anope"); - ModuleManager::Attach(I_OnBotBan, this); } |