From 76102e29ddd670c5389b1bb3eb2a5162c380a42d Mon Sep 17 00:00:00 2001 From: jonas747 Date: Sat, 13 Apr 2019 21:36:25 +0200 Subject: [PATCH] reddit: don't enable if theres missing config options --- reddit/reddit.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/reddit/reddit.go b/reddit/reddit.go index 0ff20bb120..a0567df06a 100644 --- a/reddit/reddit.go +++ b/reddit/reddit.go @@ -82,6 +82,11 @@ func RegisterPlugin() { stopFeedChan: make(chan *sync.WaitGroup), } + if ClientID == "" || ClientSecret == "" || RefreshToken == "" { + log.Warn("[reddit] Missing reddit config, not enabling plugin") + return + } + plugin.redditClient = setupClient() common.RegisterPlugin(plugin)