From 7a7cab67b1967ba5ea8ce506b44dacc21c710030 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 24 Aug 2022 22:38:02 +0100 Subject: [PATCH] Don't engage in server automation in a restricted context. --- src/d_netcmd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index c36922275..0a38ed2b6 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3918,6 +3918,12 @@ void Schedule_Run(void) return; } + if (K_CanChangeRules() == false) + { + // Don't engage in automation while in a restricted context. + return; + } + for (i = 0; i < schedule_len; i++) { scheduleTask_t *task = schedule[i]; @@ -4048,6 +4054,12 @@ void Automate_Run(automateEvents_t type) return; } + if (K_CanChangeRules() == false) + { + // Don't engage in automation while in a restricted context. + return; + } + #ifdef PARANOIA if (type >= AEV__MAX) {