1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 15:13:14 +02:00

Improve the BotServ fantasy commands

- Allow multiple character fantasy prefixes.
- Allow using the command alias as the command prefix.
- Match the service name case insensitively.
This commit is contained in:
Sadie Powell
2025-12-14 01:34:57 +00:00
parent 852aae5e4f
commit 57446ee49b
4 changed files with 46 additions and 32 deletions
+4 -4
View File
@@ -147,11 +147,11 @@ public:
),
source.service->nick.c_str());
const Anope::string &fantasycharacters = Config->GetModule("fantasy").Get<const Anope::string>("fantasycharacter", "!");
const Anope::string &fantasycharacters = Config->GetModule("fantasy").Get<const Anope::string>("prefix", "!");
if (!fantasycharacters.empty())
{
source.Reply(" ");
source.Reply(_("Fantasy commands may be prefixed with one of the following characters: %s"),
source.Reply(_("Fantasy commands may be prefixed with one of the following fantasy prefixes: %s"),
fantasycharacters.c_str());
}
source.Reply(" ");
@@ -187,13 +187,13 @@ public:
source.Reply(_("Bot will join a channel whenever there is at least \002%d\002 user(s) on it."),
Config->GetModule(this).Get<unsigned>("minusers"));
const Anope::string &fantasycharacters = Config->GetModule("fantasy").Get<const Anope::string>("fantasycharacter", "!");
const Anope::string &fantasycharacters = Config->GetModule("fantasy").Get<const Anope::string>("prefix", "!");
if (!fantasycharacters.empty())
{
source.Reply(_(
"Additionally, if fantasy is enabled fantasy commands "
"can be executed by prefixing the command name with "
"one of the following characters: %s"
"one of the following fantasy prefixes: %s"
),
fantasycharacters.c_str());
}