From c05375b52c67bd0aa8e3d7643507e7c19cda7b01 Mon Sep 17 00:00:00 2001 From: Madpeter <57852827+Madpeterz@users.noreply.github.com> Date: Thu, 30 Nov 2023 22:29:02 +0000 Subject: [PATCH] Update InteractionService.cs --- .../Services/InteractionService.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/SecondBotEvents/Services/InteractionService.cs b/SecondBotEvents/Services/InteractionService.cs index a49ca6f..986965a 100644 --- a/SecondBotEvents/Services/InteractionService.cs +++ b/SecondBotEvents/Services/InteractionService.cs @@ -46,24 +46,19 @@ namespace SecondBotEvents.Services JsonOuput(false, sourceName, avatarName, "Interactions hooks disabled"); return false; } - if (enabledByConfig == false) - { - JsonOuput(false, sourceName, avatarName, "disabled by config"); - return false; - } - if(myConfig.GetAcceptFromMasterOnly() == false) - { - return true; - } - if (master.CommandsService.myConfig.GetEnableMasterControls() == false) + if (master.CommandsService.myConfig.GetEnableMasterControls() == ) { // master avatars list is not enabled. unable to continue JsonOuput(false, sourceName, avatarName, "masters AV list is disabled: Please set EnableMasterControls in Commands service to true"); return false; } - if (master.CommandsService.myConfig.GetMastersCSV().Contains(avatarName) == false) + if (myConfig.GetAcceptFromMasterOnly() == true) { - JsonOuput(false, sourceName, avatarName, "Not from accepted master"); + return true; + } + if (enabledByConfig == false) + { + JsonOuput(false, sourceName, avatarName, "disabled by config"); return false; } return true;