From 3b7206777efb1aa9a63ac03a4b3ca3862bff587f Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 30 Nov 2022 20:31:55 -0500 Subject: [PATCH] spectate: avoid printing or taking action on load when disabled --- plugins/spectate/spectate.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/spectate/spectate.cpp b/plugins/spectate/spectate.cpp index f6a5ad8af..73574c136 100644 --- a/plugins/spectate/spectate.cpp +++ b/plugins/spectate/spectate.cpp @@ -392,8 +392,10 @@ DFhackCExport command_result plugin_shutdown (color_ostream &out) { DFhackCExport command_result plugin_load_data (color_ostream &out) { SP::LoadSettings(); - SP::following_dwarf = SP::FollowADwarf(); - SP::PrintStatus(out); + if (enabled) { + SP::following_dwarf = SP::FollowADwarf(); + SP::PrintStatus(out); + } return DFHack::CR_OK; }