From 89d47948715046136111948e64b349f3e5b2d972 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 7 Dec 2018 08:50:40 -0500 Subject: [PATCH] make it work without frontend --- contrib/backends/srndv2/src/srnd/daemon.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/daemon.go b/contrib/backends/srndv2/src/srnd/daemon.go index d8ec4b0..7bff8d6 100644 --- a/contrib/backends/srndv2/src/srnd/daemon.go +++ b/contrib/backends/srndv2/src/srnd/daemon.go @@ -1151,14 +1151,18 @@ func (self *NNTPDaemon) Setup() { self.frontend = NewHTTPFrontend(self, self.cache, self.conf.frontend, self.conf.worker["url"]) } - + self.spamFilter.Configure(self.conf.spamconf) + regen := func(string, string, string, int) {} + if self.frontend != nil { + regen = self.frontend.RegenOnModEvent + } self.mod = &modEngine{ //spam: &self.spamFilter, store: self.store, database: self.database, - regen: self.frontend.RegenOnModEvent, + regen: regen, } // inject DB into template engine template.DB = self.database