diff options
| author | 2025-05-24 14:39:21 +0100 | |
|---|---|---|
| committer | 2025-05-24 14:39:21 +0100 | |
| commit | dc164bda2d37aad50c70584b97630a6c7f8e4288 (patch) | |
| tree | 890152eef1896f6828bb6cbacea8219e481452b9 /modules/services.cpp | |
| parent | Allow 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.cpp | 15 |
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); } |
