diff --git a/Curse/Checks/SelfMessageCheck.js b/Curse/Checks/SelfMessageCheck.js index f3304e1..1529eb4 100644 --- a/Curse/Checks/SelfMessageCheck.js +++ b/Curse/Checks/SelfMessageCheck.js @@ -13,8 +13,8 @@ function SelfMessageCheck(msg) { // Gagged OOC if ( cursedConfig.hasBlockedOOC && cursedConfig.hasIntenseVersion - && isNormalMsg - && !Player.CanTalk() && originalMsg.includes("(") + && (isNormalMsg || cursedConfig.secretNoOOC) + && !Player.CanTalk() && (originalMsg.includes("(") || (cursedConfig.secretNoOOC && isWhisper)) ) { NotifyOwners({ Tag: "SelfMsgCheckNotifyGagOOC" }); popChatSilent({ Tag: "SelfMsgCheckWearerWarnGagOOC" }); diff --git a/Curse/Constants/CursedConfig.js b/Curse/Constants/CursedConfig.js index 2666394..89893f7 100644 --- a/Curse/Constants/CursedConfig.js +++ b/Curse/Constants/CursedConfig.js @@ -105,7 +105,7 @@ function InitCursedConfig() { hasFullCurse: false, disabledCommands: [], optinCommands: [ - { command: "forcedsay", isEnabled: false }, { command: "disableblocking", isEnabled: false } + { command: "asylumlockdown", isEnabled: false }, { command: "forcedsay", isEnabled: false }, { command: "disableblocking", isEnabled: false } ], chatlog: [], savedSilent: [], diff --git a/Curse/Room/CommandsV2.js b/Curse/Room/CommandsV2.js index a6dc4c2..b55c3e3 100644 --- a/Curse/Room/CommandsV2.js +++ b/Curse/Room/CommandsV2.js @@ -344,6 +344,18 @@ const CommonCommands = [ * @type {ICommand[]} */ const AdditionalCommands = [ + { + Tag: 'curse', + Description: ', open curse setting screen', + Prerequisite: () => window.cursedConfig != null, + Action: () => { + document.getElementById("InputChat").style.display = "none"; + document.getElementById("TextAreaChatLog").style.display = "none"; + CursePreferenceRun(); + CurrentScreen = "CursePreference"; + CursePreferenceReturnRoom = "ChatRoom"; + } + }, { Tag: 'logoff', Description: ', disconnect from server', diff --git a/Curse/Room/CursePreference.js b/Curse/Room/CursePreference.js index 28273d1..9f01fa2 100644 --- a/Curse/Room/CursePreference.js +++ b/Curse/Room/CursePreference.js @@ -9,6 +9,7 @@ var CursePreferenceMainLoaded = false; var CursePreferenceErrorMessage = null; var CursePreferenceErrorMessageTime = null; var CursePreferenceCurrentTip = ""; +var CursePreferenceReturnRoom = "CurseRoom"; //////////////////////////////////////////////////////////////////MAIN // Validates updated data @@ -256,14 +257,18 @@ function CursePreferenceUnload() { // When the user exit the preference screen, we save all valid info or block with error message function CursePreferenceExit() { if (cursedConfig) { - CursePreferenceUnload(); cursedConfig = { ...CursePreferenceTemporaryConfig }; SaveConfigs(); DrawCustomBeepText("Curse data saved."); } + CursePreferenceUnload(); CursePreferenceTemporaryConfig = null; - CurseRoomRun(); - CurrentScreen = "CurseRoom"; + if (CursePreferenceReturnRoom == "CurseRoom") { + CurseRoomRun(); + CurrentScreen = "CurseRoom"; + } else { + CommonSetScreen("Online", "ChatRoom"); + } } diff --git a/Curse/Room/CurseRoom.js b/Curse/Room/CurseRoom.js index a245060..ef7dd22 100644 --- a/Curse/Room/CurseRoom.js +++ b/Curse/Room/CurseRoom.js @@ -105,6 +105,7 @@ function CurseRoomClick() { if (MouseIn(1885, 265, 90, 90)) { CursePreferenceRun(); CurrentScreen = "CursePreference"; + CursePreferenceReturnRoom = "CurseRoom"; } } @@ -199,6 +200,7 @@ async function CurseRoomCursedInfo() { DialogLeave(); CursePreferenceRun(); CurrentScreen = "CursePreference"; + CursePreferenceReturnRoom = "CurseRoom"; } function CurseRoomEyeGlow() {