Don't engage in server automation in a restricted context.

This commit is contained in:
toaster 2022-08-24 22:38:02 +01:00
parent 37f8b0e717
commit 7a7cab67b1

View file

@ -3918,6 +3918,12 @@ void Schedule_Run(void)
return; return;
} }
if (K_CanChangeRules() == false)
{
// Don't engage in automation while in a restricted context.
return;
}
for (i = 0; i < schedule_len; i++) for (i = 0; i < schedule_len; i++)
{ {
scheduleTask_t *task = schedule[i]; scheduleTask_t *task = schedule[i];
@ -4048,6 +4054,12 @@ void Automate_Run(automateEvents_t type)
return; return;
} }
if (K_CanChangeRules() == false)
{
// Don't engage in automation while in a restricted context.
return;
}
#ifdef PARANOIA #ifdef PARANOIA
if (type >= AEV__MAX) if (type >= AEV__MAX)
{ {