From 5cb9f9ccfc22887a60cd7cd9b9b09dad7d5ae67b Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 16 Jul 2010 00:55:50 +0200 Subject: Got rid of the pseudo dynamic starting stuff, wrote a decent CLI parameters handling. --- HsbotMaster/Hsbot/Core.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'HsbotMaster/Hsbot/Core.hs') diff --git a/HsbotMaster/Hsbot/Core.hs b/HsbotMaster/Hsbot/Core.hs index dad965d..d634f10 100644 --- a/HsbotMaster/Hsbot/Core.hs +++ b/HsbotMaster/Hsbot/Core.hs @@ -24,13 +24,13 @@ hsbot config txtResumeData= do Just txtData -> read txtData :: BotResumeData -- TODO : catch exception Nothing -> M.empty :: BotResumeData startTime <- case M.lookup "HSBOT" resumeData of - Just hsbotData -> do - case M.lookup "STARTTIME" hsbotData of - Just txtStartTime -> do - let gotStartTime = read txtStartTime :: UTCTime - return gotStartTime - Nothing -> getCurrentTime - Nothing -> getCurrentTime + Just hsbotData -> do + case M.lookup "STARTTIME" hsbotData of + Just txtStartTime -> do + let gotStartTime = read txtStartTime :: UTCTime + return gotStartTime + Nothing -> getCurrentTime + Nothing -> getCurrentTime let resumeData' = M.insert "HSBOT" (M.singleton "STARTTIME" $ show startTime) resumeData putStrLn "[Hsbot] Opening communication channel... " chan <- newChan :: IO (Chan BotMsg) -- cgit v1.2.3