aboutsummaryrefslogtreecommitdiffstats
path: root/modules/services.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-05-24 14:39:21 +0100
committerGravatar Sadie Powell2025-05-24 14:39:21 +0100
commitdc164bda2d37aad50c70584b97630a6c7f8e4288 (patch)
tree890152eef1896f6828bb6cbacea8219e481452b9 /modules/services.cpp
parentAllow silently expiring xlines. (diff)
Allow services to remove all SVSHOLDs using one command.
This is useful for reducing traffic on services shutdown.
Diffstat (limited to 'modules/services.cpp')
-rw-r--r--modules/services.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/services.cpp b/modules/services.cpp
index 93bdcc57e..b93afc702 100644
--- a/modules/services.cpp
+++ b/modules/services.cpp
@@ -310,9 +310,16 @@ public:
if (parameters.size() == 1)
{
- // :36DAAAAAA SVSHOLD ChanServ
- std::string reason;
- return ServerInstance->XLines->DelLine(parameters[0], "SVSHOLD", reason, user) ? CmdResult::SUCCESS : CmdResult::FAILURE;
+ if (irc::equals(parameters[0], "*"))
+ {
+ ServerInstance->XLines->DelAll("SVSHOLD", true);
+ }
+ else
+ {
+ // :36DAAAAAA SVSHOLD ChanServ
+ std::string reason;
+ return ServerInstance->XLines->DelLine(parameters[0], "SVSHOLD", reason, user) ? CmdResult::SUCCESS : CmdResult::FAILURE;
+ }
}
if (parameters.size() == 3)
@@ -674,7 +681,7 @@ public:
~ModuleServices() override
{
- ServerInstance->XLines->DelAll("SVSHOLD");
+ ServerInstance->XLines->DelAll("SVSHOLD", true);
ServerInstance->XLines->UnregisterFactory(&svsholdfactory);
}