From ed1ec5e6ec680191860cc1d419481a984782f9da Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Fri, 13 Jul 2018 19:37:59 -0500 Subject: [PATCH] Don't request PICS updates if we're not connected to IRC. #22 --- SteamIrcBot/Steam/Job Manager/Jobs/PICSJob.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SteamIrcBot/Steam/Job Manager/Jobs/PICSJob.cs b/SteamIrcBot/Steam/Job Manager/Jobs/PICSJob.cs index fc6d0db..fd6690c 100644 --- a/SteamIrcBot/Steam/Job Manager/Jobs/PICSJob.cs +++ b/SteamIrcBot/Steam/Job Manager/Jobs/PICSJob.cs @@ -24,6 +24,13 @@ protected override void OnRun() if ( !Steam.Instance.Connected ) return; + if (!IRC.Instance.Connected) + { + // if we're not connected to IRC, no reason to keep requesting changes + // we'll resume once we're connected + return; + } + Steam.Instance.Apps.PICSGetChangesSince( lastChangeNumber, true, true ); }