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.
main
AreiaAard 2 years ago
parent 4e486adf70
commit 62933c34db

@ -690,6 +690,15 @@ end
function GMCPHandler.received_room(room) function GMCPHandler.received_room(room)
Consider.clear() 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 GMCPHandler.prevRoom = room
if (Settings.config.autoConsider and GMCPHandler.get_char_state() ~= GMCPHandler.CHAR_STATE.RUNNING if (Settings.config.autoConsider and GMCPHandler.get_char_state() ~= GMCPHandler.CHAR_STATE.RUNNING
and not GMCPHandler.get_room_flags().safe) then and not GMCPHandler.get_room_flags().safe) then

Loading…
Cancel
Save