From 62933c34db5c53d8d4c481e6216361f0da68b3f3 Mon Sep 17 00:00:00 2001 From: AreiaAard Date: Wed, 19 Apr 2023 08:43:50 -0400 Subject: [PATCH] Disable auto-con when zone changes Rezit suggested disabling auto-con when entering certain areas to cut down on spam. Because determining which areas to include would be fairly subjective, and because the list would change as new areas are added anyway, decide to disable auto-con whenever the user moves to a different zone, forcing them to re-enable it if they want. This will, hopefully, cut down on spam caused by inattentive/inconsiderate users. --- areia_consider.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/areia_consider.xml b/areia_consider.xml index a997d54..0cc8f83 100644 --- a/areia_consider.xml +++ b/areia_consider.xml @@ -690,6 +690,15 @@ end function GMCPHandler.received_room(room) Consider.clear() + + -- If zone changes and auto-mode is on, then turn it off. This + -- will maybe, hopefully cut down on people spamming groups... + if (Settings.config.autoConsider and GMCPHandler.prevRoom + and GMCPHandler.prevRoom.zone ~= room.zone) then + Utility.plugin_msg("Disabling auto mode due to zone change.") + Settings.auto_consider(nil, nil, {setting="off"}) + end + GMCPHandler.prevRoom = room if (Settings.config.autoConsider and GMCPHandler.get_char_state() ~= GMCPHandler.CHAR_STATE.RUNNING and not GMCPHandler.get_room_flags().safe) then