From 914e63f6bb46c3ff132c5f642cffcb72485551e0 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 9 Aug 2026 20:13:21 +0100 Subject: Serve plain ZNC log files too --- src/Index.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Index.hs') diff --git a/src/Index.hs b/src/Index.hs index ee3cdaf..aaf0a81 100644 --- a/src/Index.hs +++ b/src/Index.hs @@ -18,6 +18,7 @@ module Index ( indexGetEventsDay, indexNumEvents, indexCalendar, + indexFileForDay, ) where import Control.Applicative (empty) @@ -487,6 +488,10 @@ indexGetEventsDay index@(Index _ mp _) chan kind day = do in (firstlast, events') Nothing -> (firstlast, []) -- if the file doesn't exist, there ain't no events +indexFileForDay :: Index -> Channel -> Day -> FilePath +indexFileForDay (Index basedir _ _) (Channel network channel) day = + basedir T.unpack network T.unpack channel toFileName (dayToYMD day) + -- utilities loadDay :: Index -> Channel -> YMD -> IO (Maybe RawEvents) -- cgit v1.3.1