summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-15 15:59:51 +0100
committerSadie Powell <sadie@witchery.services>2025-04-15 15:59:51 +0100
commit75e250150021b76ba4291e16d2bf304c34676e27 (patch)
tree007bc44043388f8ad7e89ff543967ef7ec7dce74
parent1c6db3768127f5d011e19dc7dfd8b7f7f8690205 (diff)
Allow unbanning virtual modes, add the !unmute fantasy command.
-rw-r--r--data/botserv.example.conf1
-rw-r--r--modules/chanserv/cs_unban.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/data/botserv.example.conf b/data/botserv.example.conf
index 034b6de40..07e852d45 100644
--- a/data/botserv.example.conf
+++ b/data/botserv.example.conf
@@ -410,6 +410,7 @@ fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv
fantasy { name = "SYNC"; command = "chanserv/sync"; }
fantasy { name = "TOPIC"; command = "chanserv/topic"; }
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
+fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET"; }
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
fantasy { name = "UP"; command = "chanserv/up"; }
fantasy { name = "VOICE"; command = "chanserv/modes"; }
diff --git a/modules/chanserv/cs_unban.cpp b/modules/chanserv/cs_unban.cpp
index d0dae5e73..0a1955115 100644
--- a/modules/chanserv/cs_unban.cpp
+++ b/modules/chanserv/cs_unban.cpp
@@ -23,7 +23,8 @@ public:
void Execute(CommandSource &source, const std::vector<Anope::string> &params) override
{
- ChannelMode *cm = ModeManager::FindChannelModeByName("BAN");
+ const auto &mode = Config->GetCommand(source).Get<Anope::string>("mode", "BAN");
+ auto *cm = ModeManager::FindChannelModeByName(mode);
if (!cm)
return;