summaryrefslogtreecommitdiff
path: root/HsbotMaster/Hsbot
diff options
context:
space:
mode:
authorJulien Dessaux2010-07-16 00:55:50 +0200
committerJulien Dessaux2010-07-16 11:34:13 +0200
commit5cb9f9ccfc22887a60cd7cd9b9b09dad7d5ae67b (patch)
tree04c8a659e614ba938cf1143c1df4233d682fff61 /HsbotMaster/Hsbot
parentMade some slight changes in order to make the bot's core "compile". (diff)
downloadhsbot-5cb9f9ccfc22887a60cd7cd9b9b09dad7d5ae67b.tar.gz
hsbot-5cb9f9ccfc22887a60cd7cd9b9b09dad7d5ae67b.tar.bz2
hsbot-5cb9f9ccfc22887a60cd7cd9b9b09dad7d5ae67b.zip
Got rid of the pseudo dynamic starting stuff, wrote a decent CLI parameters handling.
Diffstat (limited to '')
-rw-r--r--HsbotMaster/Hsbot/Core.hs14
1 files changed, 7 insertions, 7 deletions
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)